это мой код
определение zip-итератора
`using namespace std;
typedef thrust::device_vector<unsigned int>::iterator IntIterator;
typedef thrust::device_vector<float>::iterator FloatIterator;
typedef thrust::tuple<IntIterator, FloatIterator> IteratorTuple;
typedef thrust::zip_iterator<IteratorTuple> ZipIterator;`
отличия от pred
struct is_less_than_zero_zip
{
__host__ __device__
bool operator()(ZipIterator & x)
{
return thrust::get<0>(x[0]) <= 5.0;
}
};
main запуск функции
int main(void)
{
const int N=10;
определение вектора
thrust::host_vector<unsigned int> h_values;
h_values = thrust::host_vector<unsigned int>(N);
thrust::sequence(h_values.begin(), h_values.end());
thrust::device_vector<unsigned int> d_values;
d_values = h_values;
thrust::device_vector<float> d_keys;
d_keys=h_keys;
ZipIterator iter(thrust::make_tuple(d_values.begin(), d_keys.begin()));
вопрос в том, как определить мой пред
is_less_than_zero_zip pred;
thrust::remove_if(iter,iter+N,pred);
return 0;
}
Спасибо