16 #define JITIFY_PRINT_INSTANTIATION 1 17 #define JITIFY_PRINT_SOURCE 1 18 #define JITIFY_PRINT_LOG 1 19 #define JITIFY_PRINT_PTX 1 20 #define JITIFY_PRINT_LAUNCH 1 25 #define JITIFY_PRINT_INSTANTIATION 0 26 #define JITIFY_PRINT_SOURCE 0 27 #define JITIFY_PRINT_LOG 0 28 #define JITIFY_PRINT_PTX 0 29 #define JITIFY_PRINT_LAUNCH 0 33 #include "jitify_options.hpp" 42 static jitify::JitCache *kernel_cache =
nullptr;
43 static jitify::Program *program =
nullptr;
44 static bool jitify_init =
false;
46 static void create_jitify_program(
const char *file,
const std::vector<std::string> extra_options = {}) {
49 kernel_cache =
new jitify::JitCache;
51 std::vector<std::string> options = {
"-std=c++11",
"-ftz=true",
"-prec-div=false",
"-prec-sqrt=false"};
54 options.push_back(std::string(
"-G"));
58 for (
auto option : extra_options) options.push_back(option);
60 program =
new jitify::Program(kernel_cache->program(file, 0, options));