An implementation of a subclass of kernel_t for kernels compiled together with the host-side program.
More...
#include "../kernel.hpp"
#include <cuda_runtime.h>
#include <type_traits>
Go to the source code of this file.
|
| cuda |
| Definitions and functionality wrapping CUDA APIs.
|
|
|
|
template<typename KernelFunctionPtr > |
apriori_compiled_t | cuda::kernel::get (const device_t &device, KernelFunctionPtr function_ptr) |
| Choose an association of a __global__ kernel function with a context (or a device's primary context), and produce a proxy object for that association with which the library can more readily act. More...
|
|
template<typename KernelFunctionPtr > |
apriori_compiled_t | cuda::kernel::get (context_t context, KernelFunctionPtr function_ptr) |
|
An implementation of a subclass of kernel_t for kernels compiled together with the host-side program.
◆ get() [1/2]
template<typename KernelFunctionPtr >
apriori_compiled_t cuda::kernel::get |
( |
const device_t & |
device, |
|
|
KernelFunctionPtr |
function_ptr |
|
) |
| |
Choose an association of a __global__
kernel function with a context (or a device's primary context), and produce a proxy object for that association with which the library can more readily act.
Obtain a wrapped kernel object corresponding to a "raw" kernel function.
- Note
- The returned kernel proxy object will keep the device's primary
- Parameters
-
device | The device with whose primary context to construct an associated kernel object |
- Note
- Kernel objects are device (and context) specific;' but kernels built from functions in program sources are used (only?) with the primary context of a device
-
The returned kernel proxy object will keep the device's primary context active while the kernel exists.
◆ get() [2/2]
template<typename KernelFunctionPtr >
apriori_compiled_t cuda::kernel::get |
( |
context_t |
context, |
|
|
KernelFunctionPtr |
function_ptr |
|
) |
| |
- Parameters
-
context | The context for which to construct an associated kernel object |