i’ve a simple question , if for example i would like to use a cuda kernel i wrote on a thrust vector , must i cast my device_vector into a regular pointer type? or is there another way?
oh and another thing , regarding the device_vector constructur ,
if i have a pointer allocated on the GPU , is there a quick device_vector that accepts that pointer or am i supposed to tranfer everything first to the CPU and only then declare my device_vector with the appropriate arguments(CPU allocated variables) ?
Thanks , igal !
You have 2 options:
18-22). I can also advice to look close to
zip_iterator‘skernel, then it will be more simple to cast vector to
raw_pointer(manual p. 11)To use standart algorithms you can wrap pointer to class device_ptr. Then you can use object same as device_vector.
Code from manual p. 12.