Blender
V3.3
intern
cycles
device
optix
cycles/device/optix/util.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: Apache-2.0
2
* Copyright 2011-2022 Blender Foundation */
3
4
#pragma once
5
6
#ifdef WITH_OPTIX
7
8
# include "
device/cuda/util.h
"
9
10
# ifdef WITH_CUDA_DYNLOAD
11
# include <cuew.h>
12
// Do not use CUDA SDK headers when using CUEW
13
# define OPTIX_DONT_INCLUDE_CUDA
14
# endif
15
16
# include <optix_stubs.h>
17
18
/* Utility for checking return values of OptiX function calls. */
19
# define optix_device_assert(optix_device, stmt) \
20
{ \
21
OptixResult result = stmt; \
22
if (result != OPTIX_SUCCESS) { \
23
const char *name = optixGetErrorName(result); \
24
optix_device->set_error( \
25
string_printf("%s in %s (%s:%d)"
, name, #stmt, __FILE__, __LINE__)); \
26
} \
27
} \
28
(void)0
29
30
# define optix_assert(stmt) optix_device_assert(this, stmt)
31
32
#endif
/* WITH_OPTIX */
util.h
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1