-2

以下代码是否有效:

typedef thrust::device_ptr<int> IntIterator;
typedef thrust::device_ptr<float> FloatIterator;
typedef thrust::tuple<IntIterator,FloatIterator> IteratorTuple;
typedef thrust::zip_iterator<IteratorTuple> myZipIterator;

我知道下面是正确的,但在上述情况下,我们使用的是指针:

 typedef thrust::device_vector<float>::iterator       FloatIterator;  
typedef thrust::tuple<FloatIterator, FloatIterator, FloatIterator> FloatIteratorTuple;           
 typedef thrust::zip_iterator<FloatIteratorTuple>                   Float3Iterator;  
4

1 回答 1

1

是的,您可以,并且可以使用您之前的问题。此外,阅读编译器错误消息,我猜那thrust::device_vector<type>::iteratorthrust::device_ptr<type>.

于 2012-12-22T09:57:44.110 回答