Medial Code Documentation
|
Do Transformation on HostDeviceVectors. More...
#include <transform.h>
Static Public Member Functions | |
template<typename Functor > | |
static Evaluator< Functor > | Init (Functor func, Range const range, int32_t n_threads, int32_t device_idx) |
Initialize a Transform object. | |
Do Transformation on HostDeviceVectors.
CompiledWithCuda | A bool parameter used to distinguish compilation trajectories, users do not need to use it. |
Note: Using Transform is a VERY tricky thing to do. Transform uses template argument to duplicate itself into two different types, one for CPU, another for CUDA. The trick is not without its flaw:
If you use it in a function that can be compiled by both nvcc and host compiler, the behaviour is un-defined! Because your function is NOT duplicated by CompiledWithCuda
. At link time, CUDA compiler resolution will merge functions with same signature.
|
inlinestatic |
Initialize a Transform object.
Functor | A callable object type. |