Is it restrictive to do so? This is what I am trying to achieve:
struct StructOperator : public thrust::unary_function<float, int> {
int num_;
thrust::device_vector<int> v_test;
explicit StructOperator(thrust::device_vector<int> const& input_v) :
v_test(input_v), num_(input_v.size()) {};
__host__ __device__
float operator()(int index) {
// magic happens
}
};
Having done some Googling around (Redirecting to Google Groups) and (c++ - How to pass a vector to the constructor of a thrust-based odeint observer, such that it can be read within the functor - Stack Overflow), is it true that I can only store the raw pointer?