You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
My code: thrust::counting_iterator<unsigned> countingIterator(0);
The warning:
note: see reference to class template instantiation 'thrust::counting_iterator<unsigned int,thrust::use_default,thrust::use_default,thrust::use_default>' being compiled
And here's a deeper trace of it:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust/iterator/iterator_adaptor.h(204): warning C4244: '+=': conversion from '__int64' to 'Base', possible loss of data
1> with
1> [
1> Base=unsigned int
1> ]
1>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust/iterator/iterator_adaptor.h(202): note: while compiling class template member function 'void thrust::iterator_adaptor<thrust::counting_iterator<unsigned int,thrust::use_default,thrust::use_default,thrust::use_default>,Incrementable,Incrementable,thrust::any_system_tag,thrust::random_access_traversal_tag,Incrementable,__int64>::advance(__int64)'
1> with
1> [
1> Incrementable=unsigned int
1> ]
1>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust/iterator/iterator_facade.h(171): note: see reference to function template instantiation 'void thrust::iterator_adaptor<thrust::counting_iterator<unsigned int,thrust::use_default,thrust::use_default,thrust::use_default>,Incrementable,Incrementable,thrust::any_system_tag,thrust::random_access_traversal_tag,Incrementable,__int64>::advance(__int64)' being compiled
1> with
1> [
1> Incrementable=unsigned int
1> ]
1>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include\thrust/iterator/counting_iterator.h(132): note: see reference to class template instantiation 'thrust::iterator_adaptor<thrust::counting_iterator<unsigned int,thrust::use_default,thrust::use_default,thrust::use_default>,Incrementable,Incrementable,thrust::any_system_tag,thrust::random_access_traversal_tag,Incrementable,__int64>' being compiled
1> with
1> [
1> Incrementable=unsigned int
1> ]
The text was updated successfully, but these errors were encountered:
mfrancis95
changed the title
Compiler warning with counting_iterator
Compiler warning with counting_iterator in MSVC
May 26, 2020
My code:
thrust::counting_iterator<unsigned> countingIterator(0);
The warning:
And here's a deeper trace of it:
The text was updated successfully, but these errors were encountered: