Blender  V2.93
kernel_split_function.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2017 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 #define KERNEL_NAME_JOIN(a, b) a##_##b
18 #define KERNEL_NAME_EVAL(a, b) KERNEL_NAME_JOIN(a, b)
19 
20 __kernel void KERNEL_NAME_EVAL(kernel_ocl_path_trace,
21  KERNEL_NAME)(ccl_global char *kg_global,
23 
26 
28 
31  ccl_global unsigned int *work_pools,
33 {
34 #ifdef LOCALS_TYPE
35  ccl_local LOCALS_TYPE locals;
36 #endif
37 
38  KernelGlobals *kg = (KernelGlobals *)kg_global;
39 
40  if (ccl_local_id(0) + ccl_local_id(1) == 0) {
41  kg->data = data;
42 
43  kernel_split_params.queue_index = queue_index;
44  kernel_split_params.use_queues_flag = use_queues_flag;
45  kernel_split_params.work_pools = work_pools;
46  kernel_split_params.tile.buffer = buffer;
47 
52  ray_state);
53  }
54 
55  kernel_set_buffer_pointers(kg, KERNEL_BUFFER_ARGS);
56 
57  KERNEL_NAME_EVAL(kernel, KERNEL_NAME)
58  (kg
59 #ifdef LOCALS_TYPE
60  ,
61  &locals
62 #endif
63  );
64 }
65 
66 #undef KERNEL_NAME_JOIN
67 #undef KERNEL_NAME_EVAL
#define ccl_global_size(d)
#define ccl_constant
ccl_device_inline uint ccl_local_id(uint d)
#define ccl_local
#define ccl_global
ccl_device_inline void split_data_init(KernelGlobals *kg, ccl_global SplitData *split_data, size_t num_elements, ccl_global void *data, ccl_global char *ray_state)
#define kernel_split_params
#define kernel_split_state
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char * use_queues_flag
__kernel void ccl_constant KernelData * data
kernel_set_buffer_pointers(kg, KERNEL_BUFFER_ARGS)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int * queue_index
__kernel void ccl_constant KernelData ccl_global void * split_data_buffer
__kernel void ccl_constant KernelData ccl_global void ccl_global char KERNEL_BUFFER_PARAMS
__kernel void ccl_constant KernelData ccl_global void ccl_global char * ray_state
#define KERNEL_NAME_EVAL(a, b)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int * work_pools