18 OptixDeviceContext SLOptix::context = {};
19 CUstream SLOptix::stream = {};
20 string SLOptix::exePath;
23 void context_log_cb(
unsigned int level,
28 std::cerr <<
"[" << std::setw(2) << level <<
"][" << std::setw(12) << tag <<
"]: "
33 void SLOptix::createStreamAndContext()
37 CUDA_CHECK(cuInit(0));
38 CUDA_CHECK(cuMemFree(0));
39 CUDA_CHECK(cuCtxCreate(&cu_ctx, 0, 0));
40 CUDA_CHECK(cuStreamCreate(&SLOptix::stream,
44 OPTIX_CHECK(optixInit());
45 OptixDeviceContextOptions options = {};
46 options.logCallbackFunction = &context_log_cb;
47 options.logCallbackLevel = 4;
48 OPTIX_CHECK(optixDeviceContextCreate(cu_ctx,