File: nvbug_1632709__reduce_large_input_sizes.cu

package info (click to toggle)
libthrust 1.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,208 kB
  • sloc: ansic: 28,429; cpp: 26,501; python: 1,228; perl: 460; sh: 348; makefile: 103
file content (20 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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);
}