We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4380f1 commit e167dceCopy full SHA for e167dce
1 file changed
examples/raw_reference_cast.cu
@@ -84,11 +84,9 @@ int main(void)
84
typedef Vector::iterator Iterator;
85
typedef thrust::device_system_tag System;
86
87
- size_t N = 5;
88
-
89
// allocate device memory
90
- Vector A(N);
91
- Vector B(N);
+ Vector A(5);
+ Vector B(5);
92
93
// initialize A and B
94
thrust::sequence(A.begin(), A.end());
@@ -100,7 +98,7 @@ int main(void)
100
98
101
99
// note: we must specify the System to ensure correct execution
102
thrust::for_each(thrust::counting_iterator<int,System>(0),
103
- thrust::counting_iterator<int,System>(static_cast<int>(N)),
+ thrust::counting_iterator<int,System>(5),
104
copy_iterators<Iterator,Iterator>(A.begin(), B.begin()));
105
106
std::cout << "After A->B Copy" << std::endl;
0 commit comments