cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
apriori_compiled.hpp File Reference

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>
Include dependency graph for apriori_compiled.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cuda::kernel::apriori_compiled::attributes_t
 a wrapper around cudaFuncAttributes, offering a few convenience member functions. More...
 
class  cuda::kernel::apriori_compiled_t
 A subclass of the kernel_t interface for kernels being functions marked as global in source files and compiled apriori. More...
 

Namespaces

 cuda
 Definitions and functionality wrapping CUDA APIs.
 

Functions

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)
 

Detailed Description

An implementation of a subclass of kernel_t for kernels compiled together with the host-side program.

Function Documentation

◆ 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
deviceThe 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
contextThe context for which to construct an associated kernel object