Blender  V2.93
Macros | Typedefs | Functions
kernel_compat_cuda.h File Reference
#include <stdint.h>
#include "util/util_half.h"
#include "util/util_types.h"

Go to the source code of this file.

Macros

#define __KERNEL_GPU__
 
#define __KERNEL_CUDA__
 
#define CCL_NAMESPACE_BEGIN
 
#define CCL_NAMESPACE_END
 
#define __NODES_MAX_GROUP__   NODE_GROUP_LEVEL_MAX
 
#define __NODES_FEATURES__   NODE_FEATURE_ALL
 
#define ccl_device   __device__ __inline__
 
#define ccl_device_inline   __device__ __forceinline__
 
#define ccl_device_forceinline   __device__ __forceinline__
 
#define ccl_device_noinline   __device__ __noinline__
 
#define ccl_device_noinline_cpu   ccl_device
 
#define ccl_global
 
#define ccl_static_constant   __constant__
 
#define ccl_constant   const
 
#define ccl_local   __shared__
 
#define ccl_local_param
 
#define ccl_private
 
#define ccl_may_alias
 
#define ccl_addr_space
 
#define ccl_restrict   __restrict__
 
#define ccl_loop_no_unroll
 
#define ccl_ref
 
#define ccl_align(n)   __align__(n)
 
#define ccl_optional_struct_init
 
#define ATTR_FALLTHROUGH
 
#define CCL_MAX_LOCAL_SIZE   (CUDA_THREADS_BLOCK_WIDTH * CUDA_THREADS_BLOCK_WIDTH)
 
#define kernel_assert(cond)
 
#define ccl_global_id(d)   (ccl_group_id(d) * ccl_local_size(d) + ccl_local_id(d))
 
#define ccl_global_size(d)   (ccl_num_groups(d) * ccl_local_size(d))
 
#define kernel_tex_fetch(t, index)   t[(index)]
 
#define kernel_tex_array(t)   (t)
 
#define kernel_data   __data
 
#define cosf(x)   __cosf(((float)(x)))
 
#define sinf(x)   __sinf(((float)(x)))
 
#define powf(x, y)   __powf(((float)(x)), ((float)(y)))
 
#define tanf(x)   __tanf(((float)(x)))
 
#define logf(x)   __logf(((float)(x)))
 
#define expf(x)   __expf(((float)(x)))
 

Typedefs

typedef unsigned short half
 
typedef unsigned long long CUtexObject
 

Functions

__device__ half __float2half (const float f)
 
ccl_device_inline uint ccl_local_id (uint d)
 
ccl_device_inline uint ccl_local_size (uint d)
 
ccl_device_inline uint ccl_group_id (uint d)
 
ccl_device_inline uint ccl_num_groups (uint d)
 

Macro Definition Documentation

◆ __KERNEL_CUDA__

#define __KERNEL_CUDA__

Definition at line 21 of file kernel_compat_cuda.h.

◆ __KERNEL_GPU__

#define __KERNEL_GPU__

Definition at line 20 of file kernel_compat_cuda.h.

◆ __NODES_FEATURES__

#define __NODES_FEATURES__   NODE_FEATURE_ALL

Definition at line 30 of file kernel_compat_cuda.h.

◆ __NODES_MAX_GROUP__

#define __NODES_MAX_GROUP__   NODE_GROUP_LEVEL_MAX

Definition at line 27 of file kernel_compat_cuda.h.

◆ ATTR_FALLTHROUGH

#define ATTR_FALLTHROUGH

Definition at line 86 of file kernel_compat_cuda.h.

◆ ccl_addr_space

#define ccl_addr_space

Definition at line 76 of file kernel_compat_cuda.h.

◆ ccl_align

#define ccl_align (   n)    __align__(n)

Definition at line 83 of file kernel_compat_cuda.h.

◆ ccl_constant

#define ccl_constant   const

Definition at line 71 of file kernel_compat_cuda.h.

◆ ccl_device

#define ccl_device   __device__ __inline__

Definition at line 59 of file kernel_compat_cuda.h.

◆ ccl_device_forceinline

#define ccl_device_forceinline   __device__ __forceinline__

Definition at line 62 of file kernel_compat_cuda.h.

◆ ccl_device_inline

#define ccl_device_inline   __device__ __forceinline__

Definition at line 61 of file kernel_compat_cuda.h.

◆ ccl_device_noinline

#define ccl_device_noinline   __device__ __noinline__

Definition at line 67 of file kernel_compat_cuda.h.

◆ ccl_device_noinline_cpu

#define ccl_device_noinline_cpu   ccl_device

Definition at line 68 of file kernel_compat_cuda.h.

◆ ccl_global

#define ccl_global

Definition at line 69 of file kernel_compat_cuda.h.

◆ ccl_global_id

#define ccl_global_id (   d)    (ccl_group_id(d) * ccl_local_size(d) + ccl_local_id(d))

Definition at line 115 of file kernel_compat_cuda.h.

◆ ccl_global_size

#define ccl_global_size (   d)    (ccl_num_groups(d) * ccl_local_size(d))

Definition at line 131 of file kernel_compat_cuda.h.

◆ ccl_local

#define ccl_local   __shared__

Definition at line 72 of file kernel_compat_cuda.h.

◆ ccl_local_param

#define ccl_local_param

Definition at line 73 of file kernel_compat_cuda.h.

◆ ccl_loop_no_unroll

#define ccl_loop_no_unroll

Definition at line 78 of file kernel_compat_cuda.h.

◆ CCL_MAX_LOCAL_SIZE

#define CCL_MAX_LOCAL_SIZE   (CUDA_THREADS_BLOCK_WIDTH * CUDA_THREADS_BLOCK_WIDTH)

Definition at line 88 of file kernel_compat_cuda.h.

◆ ccl_may_alias

#define ccl_may_alias

Definition at line 75 of file kernel_compat_cuda.h.

◆ CCL_NAMESPACE_BEGIN

#define CCL_NAMESPACE_BEGIN

Definition at line 22 of file kernel_compat_cuda.h.

◆ CCL_NAMESPACE_END

#define CCL_NAMESPACE_END

Definition at line 23 of file kernel_compat_cuda.h.

◆ ccl_optional_struct_init

#define ccl_optional_struct_init

Definition at line 84 of file kernel_compat_cuda.h.

◆ ccl_private

#define ccl_private

Definition at line 74 of file kernel_compat_cuda.h.

◆ ccl_ref

#define ccl_ref

Definition at line 82 of file kernel_compat_cuda.h.

◆ ccl_restrict

#define ccl_restrict   __restrict__

Definition at line 77 of file kernel_compat_cuda.h.

◆ ccl_static_constant

#define ccl_static_constant   __constant__

Definition at line 70 of file kernel_compat_cuda.h.

◆ cosf

#define cosf (   x)    __cosf(((float)(x)))

Definition at line 171 of file kernel_compat_cuda.h.

◆ expf

#define expf (   x)    __expf(((float)(x)))

Definition at line 176 of file kernel_compat_cuda.h.

◆ kernel_assert

#define kernel_assert (   cond)

Definition at line 92 of file kernel_compat_cuda.h.

◆ kernel_data

#define kernel_data   __data

Definition at line 167 of file kernel_compat_cuda.h.

◆ kernel_tex_array

#define kernel_tex_array (   t)    (t)

Definition at line 165 of file kernel_compat_cuda.h.

◆ kernel_tex_fetch

#define kernel_tex_fetch (   t,
  index 
)    t[(index)]

Definition at line 164 of file kernel_compat_cuda.h.

◆ logf

#define logf (   x)    __logf(((float)(x)))

Definition at line 175 of file kernel_compat_cuda.h.

◆ powf

#define powf (   x,
  y 
)    __powf(((float)(x)), ((float)(y)))

Definition at line 173 of file kernel_compat_cuda.h.

◆ sinf

#define sinf (   x)    __sinf(((float)(x)))

Definition at line 172 of file kernel_compat_cuda.h.

◆ tanf

#define tanf (   x)    __tanf(((float)(x)))

Definition at line 174 of file kernel_compat_cuda.h.

Typedef Documentation

◆ CUtexObject

typedef unsigned long long CUtexObject

Definition at line 42 of file kernel_compat_cuda.h.

◆ half

typedef unsigned short half

Definition at line 41 of file kernel_compat_cuda.h.

Function Documentation

◆ __float2half()

__device__ half __float2half ( const float  f)

Definition at line 50 of file kernel_compat_cuda.h.

◆ ccl_group_id()

ccl_device_inline uint ccl_group_id ( uint  d)

Definition at line 133 of file kernel_compat_cuda.h.

◆ ccl_local_id()

ccl_device_inline uint ccl_local_id ( uint  d)

◆ ccl_local_size()

ccl_device_inline uint ccl_local_size ( uint  d)

◆ ccl_num_groups()

ccl_device_inline uint ccl_num_groups ( uint  d)

Definition at line 147 of file kernel_compat_cuda.h.