Blender V5.3
device/oneapi/globals.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2021-2022 Intel Corporation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5/* Constant Globals */
6
7#pragma once
8
9#include "kernel/types.h"
14#include "util/color.h"
19/* NOTE(@nsirgien): With SYCL we can't declare __constant__ global variable, which will be
20 * accessible from device code, like it has been done for Cycles CUDA backend. So, the backend will
21 * allocate this "constant" memory regions and store pointers to them in oneAPI context class */
28#define KERNEL_DATA_ARRAY(type, name) const type *__##name = nullptr;
29#define KERNEL_DATA_ARRAY_WRITABLE(type, name) type *__##name = nullptr;
32 const KernelData *__data;
33 sycl::kernel_handler kernel_handler;
34};
38#define kernel_data (*(__data))
39#define kernel_integrator_state (*(integrator_state))
41/* data lookup defines */
43#define kernel_data_fetch(name, index) __##name[(index)]
44#define kernel_data_write(name, index, value) __##name[(index)] = (value)
45#define kernel_data_array(name) __##name
#define CCL_NAMESPACE_END
#define ccl_restrict
#define ccl_global
const KernelData * __data
sycl::kernel_handler kernel_handler
CCL_NAMESPACE_END IntegratorStateGPU * integrator_state