NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
jitify::JitCache Class Reference

#include <jitify.hpp>

Public Types

enum  { DEFAULT_CACHE_SIZE = 128 }
 

Public Member Functions

 JitCache (size_t cache_size=DEFAULT_CACHE_SIZE)
 
Program program (std::string source, jitify::detail::vector< std::string > headers=0, jitify::detail::vector< std::string > options=0, file_callback_type file_callback=0)
 

Friends

class Program
 

Detailed Description

An object that manages a cache of JIT-compiled CUDA kernels.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

JitCache constructor.

Parameters
cache_sizeThe number of kernels to hold in the cache before overwriting the least-recently-used ones.
Enumerator
DEFAULT_CACHE_SIZE 

Constructor & Destructor Documentation

◆ JitCache()

jitify::JitCache::JitCache ( size_t  cache_size = DEFAULT_CACHE_SIZE)
inline

Member Function Documentation

◆ program()

Program jitify::JitCache::program ( std::string  source,
jitify::detail::vector< std::string >  headers = 0,
jitify::detail::vector< std::string >  options = 0,
file_callback_type  file_callback = 0 
)
inline

Create a program.

Parameters
sourceA string containing either the source filename or the source itself; in the latter case, the first line must be the name of the program.
headersA vector of strings representing the source of each header file required by the program. Each entry can be either the header filename or the header source itself; in the latter case, the first line must be the name of the header (i.e., the name by which the header is #included).
optionsA vector of options to be passed to the NVRTC compiler. Include paths specified with -I are added to the search paths used by Jitify. The environment variable JITIFY_OPTIONS can also be used to define additional options.
file_callbackA pointer to a callback function that is invoked whenever a source file needs to be loaded. Inside this function, the user can either load/specify the source themselves or defer to Jitify's file-loading mechanisms.
Note
Program or header source files referenced by filename are looked-up using the following mechanisms (in this order):
1) By calling file_callback.
2) By looking for the file embedded in the executable via the GCC linker.
3) By looking for the file in the filesystem.
Jitify recursively scans all source files for #include directives and automatically adds them to the set of headers needed by the program. If a #include directive references a header that cannot be found, the directive is automatically removed from the source code to prevent immediate compilation failure. This may result in compilation errors if the header was required by the program.
Jitify automatically includes NVRTC-safe versions of some standard library headers.

References Program.

Friends And Related Function Documentation

◆ Program

friend class Program
friend

Referenced by program().


The documentation for this class was generated from the following file: