Blender
V3.3
intern
cycles
kernel
device
cuda
device/cuda/globals.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: Apache-2.0
2
* Copyright 2011-2022 Blender Foundation */
3
4
/* Constant Globals */
5
6
#pragma once
7
8
#include "
kernel/types.h
"
9
10
#include "
kernel/integrator/state.h
"
11
12
#include "
kernel/util/profiling.h
"
13
14
CCL_NAMESPACE_BEGIN
15
16
/* Not actually used, just a NULL pointer that gets passed everywhere, which we
17
* hope gets optimized out by the compiler. */
18
struct
KernelGlobalsGPU
{
19
int
unused
[1];
20
};
21
typedef
ccl_global
const
KernelGlobalsGPU
*
ccl_restrict
KernelGlobals
;
22
23
struct
KernelParamsCUDA
{
24
/* Global scene data and textures */
25
KernelData
data
;
26
#define KERNEL_DATA_ARRAY(type, name) const type *name;
27
#include "
kernel/data_arrays.h
"
28
29
/* Integrator state */
30
IntegratorStateGPU
integrator_state
;
31
};
32
33
#ifdef __KERNEL_GPU__
34
__constant__
KernelParamsCUDA
kernel_params;
35
#endif
36
37
/* Abstraction macros */
38
#define kernel_data kernel_params.data
39
#define kernel_data_fetch(name, index) kernel_params.name[(index)]
40
#define kernel_data_array(name) (kernel_params.name)
41
#define kernel_integrator_state kernel_params.integrator_state
42
43
CCL_NAMESPACE_END
ccl_restrict
#define ccl_restrict
Definition:
cuda/compat.h:50
ccl_global
#define ccl_global
Definition:
cuda/compat.h:43
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition:
cuda/compat.h:9
data_arrays.h
KernelGlobals
ccl_global const KernelGlobalsGPU *ccl_restrict KernelGlobals
Definition:
device/cuda/globals.h:21
types.h
profiling.h
CCL_NAMESPACE_BEGIN
Definition:
python.cpp:37
state.h
IntegratorStateGPU
Definition:
state.h:96
KernelData
Definition:
kernel/types.h:1152
KernelGlobalsGPU
Definition:
device/cuda/globals.h:18
KernelGlobalsGPU::unused
int unused[1]
Definition:
device/cuda/globals.h:19
KernelParamsCUDA
Definition:
device/cuda/globals.h:23
KernelParamsCUDA::integrator_state
IntegratorStateGPU integrator_state
Definition:
device/cuda/globals.h:30
KernelParamsCUDA::data
KernelData data
Definition:
device/cuda/globals.h:25
Generated on Sat Jul 27 2024 14:57:55 for Blender by
doxygen
1.9.1