c# - Cuda thrust - xutility: name followed by "::" must be a class or namespace -


i use thrust reduction in cuda application. hence include header , call function:

#include <thrust\reduce.h>  __host__ void reduction(){     unsigned int t = 0;     thrust::reduce(t,t); } 

however compile errors (only 1 type): "name followed "::" must class or namespace". problem file called xutility (which haven't touched). errors related follow class definition:

    // template class iterator_traits template<class _iter>     struct iterator_traits     {   // traits iterator _iter     typedef typename _iter::iterator_category iterator_category;     typedef typename _iter::value_type value_type;     typedef typename _iter::difference_type difference_type;     typedef difference_type distance_type;  // retained     typedef typename _iter::pointer pointer;     typedef typename _iter::reference reference;     }; 

i not template programming. doing wrong?

thrust routines designed invoked host side rather in kernels.

see example of using thrust::reduce.

https://github.com/thrust/thrust/blob/master/examples/sum.cu


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -