As it stands, thrust::for_each calls using the operators incur memory transfer penalties for each call (to and from device). However, this structure also makes it super easy to test the methods. The key decisions that need to be made are:
- Does it make sense for each functional unit to be it's own struct/operator when they are stateless?
- Should they just be methods?
- If they are methods, how would they be used?
- Can we keep them as operators and avoid the host/device memory transfer cost?
As it stands, thrust::for_each calls using the operators incur memory transfer penalties for each call (to and from device). However, this structure also makes it super easy to test the methods. The key decisions that need to be made are: