Define FLAMEGPU_CUSTOM_TRANSFORM

Define Documentation

FLAMEGPU_CUSTOM_TRANSFORM(funcName, a)

Macro for defining custom transform functions with the correct inputs.

(a)->(b)

These functions must be valid CUDA code, and have no access to the FLAMEGPU DeviceAPI.

Saves users from manually defining custom transformations, e.g.:

// User Implemented custom transform
struct SomeCustomTransform_impl {
 public:
    template<typename InT, typename OutT>
    struct unary_function {
        __device__ __forceinline__ OutT operator()(const InT &a) const {
             // transform something
             return a * a;
        }
    };
};
SomeCustomTransform_impl SomeCustomTransform;