File size: 345 Bytes
8ae5fc5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <thrust/reduce.h> 
#include <thrust/iterator/constant_iterator.h> 

#include <assert.h>
#include <iostream>
 
int main()
{ 
  long long n = 10000000000; 

  long long r = thrust::reduce(
    thrust::constant_iterator<long long>(0)
  , thrust::constant_iterator<long long>(n)
  ); 

  std::cout << r << std::endl;

  assert(r == n);
}