Blender  V2.93
kernel.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2013 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __KERNEL_H__
18 #define __KERNEL_H__
19 
20 /* CPU Kernel Interface */
21 
22 #include "kernel/kernel_types.h"
23 #include "util/util_types.h"
24 
26 
27 #define KERNEL_NAME_JOIN(x, y, z) x##_##y##_##z
28 #define KERNEL_NAME_EVAL(arch, name) KERNEL_NAME_JOIN(kernel, arch, name)
29 #define KERNEL_FUNCTION_FULL_NAME(name) KERNEL_NAME_EVAL(KERNEL_ARCH, name)
30 
31 struct KernelGlobals;
32 struct KernelData;
33 
34 KernelGlobals *kernel_globals_create();
35 void kernel_globals_free(KernelGlobals *kg);
36 
37 void *kernel_osl_memory(KernelGlobals *kg);
38 bool kernel_osl_use(KernelGlobals *kg);
39 
40 void kernel_const_copy(KernelGlobals *kg, const char *name, void *host, size_t size);
41 void kernel_global_memory_copy(KernelGlobals *kg, const char *name, void *mem, size_t size);
42 
43 #define KERNEL_ARCH cpu
45 
46 #define KERNEL_ARCH cpu_sse2
48 
49 #define KERNEL_ARCH cpu_sse3
51 
52 #define KERNEL_ARCH cpu_sse41
54 
55 #define KERNEL_ARCH cpu_avx
57 
58 #define KERNEL_ARCH cpu_avx2
60 
62 
63 #endif /* __KERNEL_H__ */
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
void kernel_const_copy(KernelGlobals *kg, const char *name, void *host, size_t size)
Definition: kernel.cpp:67
void kernel_globals_free(KernelGlobals *kg)
KernelGlobals * kernel_globals_create()
void kernel_global_memory_copy(KernelGlobals *kg, const char *name, void *mem, size_t size)
Definition: kernel.cpp:77
void * kernel_osl_memory(KernelGlobals *kg)
bool kernel_osl_use(KernelGlobals *kg)
#define CCL_NAMESPACE_END