Function ec_gpu_gen::generate

source ·
pub fn generate(source_builder: &SourceBuilder)
Expand description

Convience function to generate a kernel/source based on a source builder.

When the cuda feature is enabled it will compile a CUDA fatbin. The path to the file is stored in the _EC_GPU_CUDA_KERNEL_FATBIN environment variable, that will automatically be used by the ec-gpu-gen functionality that needs a kernel.

When the opencl feature is enabled it will generate the source code for OpenCL. The path to the source file is stored in the _EC_GPU_OPENCL_KERNEL_SOURCE environment variable, that will automatically be used by the ec-gpu-gen functionality that needs a kernel. OpenCL compiles the source at run time).