Blender V4.3
compat.h File Reference
#include <optix.h>
#include <stdint.h>
#include "util/half.h"
#include "util/types.h"

Go to the source code of this file.

Macros

#define OPTIX_DONT_INCLUDE_CUDA
 
#define __KERNEL_GPU__
 
#define __KERNEL_CUDA__   /* OptiX kernels are implicitly CUDA kernels too */
 
#define __KERNEL_OPTIX__
 
#define CCL_NAMESPACE_BEGIN
 
#define CCL_NAMESPACE_END
 
#define ATTR_FALLTHROUGH
 
#define ccl_device
 
#define ccl_device_extern   extern "C" __device__
 
#define ccl_device_inline   ccl_device
 
#define ccl_device_forceinline   ccl_device
 
#define ccl_device_inline_method   __device__ __forceinline__
 
#define ccl_device_noinline   static __device__ __noinline__
 
#define ccl_device_noinline_cpu   ccl_device
 
#define ccl_global
 
#define ccl_inline_constant   static __constant__
 
#define ccl_device_constant   __constant__ __device__
 
#define ccl_static_constexpr   static constexpr
 
#define ccl_constant   const
 
#define ccl_gpu_shared   __shared__
 
#define ccl_private
 
#define ccl_ray_data   ccl_private
 
#define ccl_may_alias
 
#define ccl_restrict   __restrict__
 
#define ccl_loop_no_unroll
 
#define ccl_align(n)   __align__(n)
 
#define ccl_optional_struct_init   = {}
 
#define kernel_assert(cond)
 

Typedefs

typedef unsigned long long CUtexObject
 
typedef CUtexObject ccl_gpu_tex_object_2D
 
typedef CUtexObject ccl_gpu_tex_object_3D
 
typedef unsigned short half
 

Functions

template<typename T >
ccl_device_forceinline T ccl_gpu_tex_object_read_2D (const ccl_gpu_tex_object_2D texobj, const float x, const float y)
 
template<typename T >
ccl_device_forceinline T ccl_gpu_tex_object_read_3D (const ccl_gpu_tex_object_3D texobj, const float x, const float y, const float z)
 
ccl_device_forceinline half __float2half (const float f)
 
ccl_device_forceinline float __half2float (const half h)
 

Macro Definition Documentation

◆ __KERNEL_CUDA__

#define __KERNEL_CUDA__   /* OptiX kernels are implicitly CUDA kernels too */

Definition at line 12 of file device/optix/compat.h.

◆ __KERNEL_GPU__

#define __KERNEL_GPU__

Definition at line 11 of file device/optix/compat.h.

◆ __KERNEL_OPTIX__

#define __KERNEL_OPTIX__

Definition at line 13 of file device/optix/compat.h.

◆ ATTR_FALLTHROUGH

#define ATTR_FALLTHROUGH

Definition at line 18 of file device/optix/compat.h.

◆ ccl_align

#define ccl_align ( n)    __align__(n)

Definition at line 56 of file device/optix/compat.h.

◆ ccl_constant

#define ccl_constant   const

Definition at line 49 of file device/optix/compat.h.

◆ ccl_device

#define ccl_device
Value:
static __device__ \
__forceinline__

Definition at line 36 of file device/optix/compat.h.

◆ ccl_device_constant

#define ccl_device_constant   __constant__ __device__

Definition at line 47 of file device/optix/compat.h.

◆ ccl_device_extern

#define ccl_device_extern   extern "C" __device__

Definition at line 39 of file device/optix/compat.h.

◆ ccl_device_forceinline

#define ccl_device_forceinline   ccl_device

Definition at line 41 of file device/optix/compat.h.

◆ ccl_device_inline

#define ccl_device_inline   ccl_device

Definition at line 40 of file device/optix/compat.h.

◆ ccl_device_inline_method

#define ccl_device_inline_method   __device__ __forceinline__

Definition at line 42 of file device/optix/compat.h.

◆ ccl_device_noinline

#define ccl_device_noinline   static __device__ __noinline__

Definition at line 43 of file device/optix/compat.h.

◆ ccl_device_noinline_cpu

#define ccl_device_noinline_cpu   ccl_device

Definition at line 44 of file device/optix/compat.h.

◆ ccl_global

#define ccl_global

Definition at line 45 of file device/optix/compat.h.

◆ ccl_gpu_shared

#define ccl_gpu_shared   __shared__

Definition at line 50 of file device/optix/compat.h.

◆ ccl_inline_constant

#define ccl_inline_constant   static __constant__

Definition at line 46 of file device/optix/compat.h.

◆ ccl_loop_no_unroll

#define ccl_loop_no_unroll

Definition at line 55 of file device/optix/compat.h.

◆ ccl_may_alias

#define ccl_may_alias

Definition at line 53 of file device/optix/compat.h.

◆ CCL_NAMESPACE_BEGIN

#define CCL_NAMESPACE_BEGIN

Definition at line 14 of file device/optix/compat.h.

◆ CCL_NAMESPACE_END

#define CCL_NAMESPACE_END

Definition at line 15 of file device/optix/compat.h.

◆ ccl_optional_struct_init

#define ccl_optional_struct_init   = {}

Definition at line 59 of file device/optix/compat.h.

◆ ccl_private

#define ccl_private

Definition at line 51 of file device/optix/compat.h.

◆ ccl_ray_data

#define ccl_ray_data   ccl_private

Definition at line 52 of file device/optix/compat.h.

◆ ccl_restrict

#define ccl_restrict   __restrict__

Definition at line 54 of file device/optix/compat.h.

◆ ccl_static_constexpr

#define ccl_static_constexpr   static constexpr

Definition at line 48 of file device/optix/compat.h.

◆ kernel_assert

#define kernel_assert ( cond)

Definition at line 63 of file device/optix/compat.h.

◆ OPTIX_DONT_INCLUDE_CUDA

#define OPTIX_DONT_INCLUDE_CUDA

Definition at line 8 of file device/optix/compat.h.

Typedef Documentation

◆ ccl_gpu_tex_object_2D

Definition at line 68 of file device/optix/compat.h.

◆ ccl_gpu_tex_object_3D

Definition at line 69 of file device/optix/compat.h.

◆ CUtexObject

typedef unsigned long long CUtexObject

Definition at line 67 of file device/optix/compat.h.

◆ half

typedef unsigned short half

Definition at line 90 of file device/optix/compat.h.

Function Documentation

◆ __float2half()

ccl_device_forceinline half __float2half ( const float f)

Definition at line 92 of file device/optix/compat.h.

◆ __half2float()

ccl_device_forceinline float __half2float ( const half h)

Definition at line 99 of file device/optix/compat.h.

◆ ccl_gpu_tex_object_read_2D()

template<typename T >
ccl_device_forceinline T ccl_gpu_tex_object_read_2D ( const ccl_gpu_tex_object_2D texobj,
const float x,
const float y )

Definition at line 72 of file device/optix/compat.h.

◆ ccl_gpu_tex_object_read_3D()

template<typename T >
ccl_device_forceinline T ccl_gpu_tex_object_read_3D ( const ccl_gpu_tex_object_3D texobj,
const float x,
const float y,
const float z )

Definition at line 80 of file device/optix/compat.h.

References z().