Blender
V5.3
intern
cycles
kernel
svm
value.h
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2
*
3
* SPDX-License-Identifier: Apache-2.0 */
4
5
#pragma once
6
7
#include "
kernel/svm/node_types.h
"
8
#include "
kernel/svm/util.h
"
9
10
CCL_NAMESPACE_BEGIN
11
12
/* Value Nodes */
13
14
template
<
typename
FloatType>
15
ccl_device
void
svm_node_value_f
(
ccl_private
float
*
ccl_restrict
stack,
16
const
ccl_global
SVMNodeValueF
&
ccl_restrict
node
)
17
{
18
/* Derivative of a constant is zero. */
19
stack_store
(stack,
node
.out_offset, FloatType(
node
.value));
20
}
21
22
template
<
typename
Float3Type>
23
ccl_device
void
svm_node_value_v
(
ccl_private
float
*
ccl_restrict
stack,
24
const
ccl_global
SVMNodeValueV
&
ccl_restrict
node
)
25
{
26
/* Derivative of a constant is zero. */
27
stack_store
(stack,
node
.out_offset, Float3Type(
node
.value));
28
}
29
30
CCL_NAMESPACE_END
util.h
stack_store
ccl_device_inline void stack_store(ccl_private float *stack, const uint a, const float f)
Definition
cycles/kernel/svm/util.h:168
ccl_restrict
#define ccl_restrict
ccl_private
#define ccl_private
ccl_global
#define ccl_global
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
node
#define node
Definition
gpu_shader_cxx_attribute.hh:142
CCL_NAMESPACE_BEGIN
Definition
python.cpp:41
node_types.h
ccl_device
#define ccl_device
Definition
radial_tiling_shared.hh:93
SVMNodeValueF
Definition
node_types.h:127
SVMNodeValueV
Definition
node_types.h:136
svm_node_value_v
ccl_device void svm_node_value_v(ccl_private float *ccl_restrict stack, const ccl_global SVMNodeValueV &ccl_restrict node)
Definition
value.h:23
svm_node_value_f
CCL_NAMESPACE_BEGIN ccl_device void svm_node_value_f(ccl_private float *ccl_restrict stack, const ccl_global SVMNodeValueF &ccl_restrict node)
Definition
value.h:15
Generated on
for Blender by
doxygen
1.18.0