Cycles Denoising: Cleanup: Rename tiles to tile_info
authorLukas Stockner <lukas.stockner@freenet.de>
Wed, 4 Jul 2018 12:26:42 +0000 (14:26 +0200)
committerLukas Stockner <lukas.stockner@freenet.de>
Wed, 4 Jul 2018 12:37:24 +0000 (14:37 +0200)
12 files changed:
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_cuda.cpp
intern/cycles/device/device_denoising.cpp
intern/cycles/device/device_denoising.h
intern/cycles/device/opencl/opencl.h
intern/cycles/device/opencl/opencl_base.cpp
intern/cycles/kernel/filter/filter_defines.h
intern/cycles/kernel/filter/filter_prefilter.h
intern/cycles/kernel/kernels/cpu/filter_cpu.h
intern/cycles/kernel/kernels/cpu/filter_cpu_impl.h
intern/cycles/kernel/kernels/cuda/filter.cu
intern/cycles/kernel/kernels/opencl/filter.cl

index b824cddd87b8a68506072f3a534a94dceaaf1dfd..c54ac1e5933a01826ebb3dcedd74ce831539ef86 100644 (file)
@@ -179,8 +179,8 @@ public:
        KernelFunctions<void(*)(KernelGlobals *, uchar4 *, float *, float, int, int, int, int)> convert_to_byte_kernel;
        KernelFunctions<void(*)(KernelGlobals *, uint4 *, float4 *, int, int, int, int, int)>   shader_kernel;
 
-       KernelFunctions<void(*)(int, TilesInfo*, int, int, float*, float*, float*, float*, float*, int*, int, int)> filter_divide_shadow_kernel;
-       KernelFunctions<void(*)(int, TilesInfo*, int, int, int, int, float*, float*, int*, int, int)>               filter_get_feature_kernel;
+       KernelFunctions<void(*)(int, TileInfo*, int, int, float*, float*, float*, float*, float*, int*, int, int)> filter_divide_shadow_kernel;
+       KernelFunctions<void(*)(int, TileInfo*, int, int, int, int, float*, float*, int*, int, int)>               filter_get_feature_kernel;
        KernelFunctions<void(*)(int, int, float*, float*, float*, float*, int*, int)>                               filter_detect_outliers_kernel;
        KernelFunctions<void(*)(int, int, float*, float*, float*, float*, int*, int)>                               filter_combine_halves_kernel;
 
@@ -459,14 +459,14 @@ public:
                }
        };
 
-       bool denoising_set_tiles(device_ptr *buffers, DenoisingTask *task)
+       bool denoising_set_tile_info(device_ptr *buffers, DenoisingTask *task)
        {
-               TilesInfo *tiles = (TilesInfo*) task->tiles_mem.host_pointer;
+               TileInfo *tile_info = (TileInfo*) task->tile_info_mem.host_pointer;
                for(int i = 0; i < 9; i++) {
-                       tiles->buffers[i] = buffers[i];
+                       tile_info->buffers[i] = buffers[i];
                }
 
-               task->tiles_mem.copy_to_device();
+               task->tile_info_mem.copy_to_device();
 
                return true;
        }
@@ -626,7 +626,7 @@ public:
                for(int y = task->rect.y; y < task->rect.w; y++) {
                        for(int x = task->rect.x; x < task->rect.z; x++) {
                                filter_divide_shadow_kernel()(task->render_buffer.samples,
-                                                             task->tiles,
+                                                             task->tile_info,
                                                              x, y,
                                                              (float*) a_ptr,
                                                              (float*) b_ptr,
@@ -650,7 +650,7 @@ public:
                for(int y = task->rect.y; y < task->rect.w; y++) {
                        for(int x = task->rect.x; x < task->rect.z; x++) {
                                filter_get_feature_kernel()(task->render_buffer.samples,
-                                                           task->tiles,
+                                                           task->tile_info,
                                                            mean_offset,
                                                            variance_offset,
                                                            x, y,
@@ -722,7 +722,7 @@ public:
                denoising.functions.combine_halves = function_bind(&CPUDevice::denoising_combine_halves, this, _1, _2, _3, _4, _5, _6, &denoising);
                denoising.functions.get_feature = function_bind(&CPUDevice::denoising_get_feature, this, _1, _2, _3, _4, &denoising);
                denoising.functions.detect_outliers = function_bind(&CPUDevice::denoising_detect_outliers, this, _1, _2, _3, _4, &denoising);
-               denoising.functions.set_tiles = function_bind(&CPUDevice::denoising_set_tiles, this, _1, &denoising);
+               denoising.functions.set_tile_info = function_bind(&CPUDevice::denoising_set_tile_info, this, _1, &denoising);
 
                denoising.filter_area = make_int4(tile.x, tile.y, tile.w, tile.h);
                denoising.render_buffer.samples = tile.sample;
index 1e7883f612b1dc48b16c0f83112fe5b46170a2ac..c8e0ea4d896f313798b7167f89ab6705df0371b2 100644 (file)
@@ -1251,14 +1251,14 @@ public:
                }
        }
 
-       bool denoising_set_tiles(device_ptr *buffers, DenoisingTask *task)
+       bool denoising_set_tile_info(device_ptr *buffers, DenoisingTask *task)
        {
-               TilesInfo *tiles = (TilesInfo*) task->tiles_mem.host_pointer;
+               TileInfo *tile_info = (TileInfo*) task->tile_info_mem.host_pointer;
                for(int i = 0; i < 9; i++) {
-                       tiles->buffers[i] = buffers[i];
+                       tile_info->buffers[i] = buffers[i];
                }
 
-               task->tiles_mem.copy_to_device();
+               task->tile_info_mem.copy_to_device();
 
                return !have_error();
        }
@@ -1534,7 +1534,7 @@ public:
                                   task->rect.w-task->rect.y);
 
                void *args[] = {&task->render_buffer.samples,
-                               &task->tiles_mem.device_pointer,
+                               &task->tile_info_mem.device_pointer,
                                &a_ptr,
                                &b_ptr,
                                &sample_variance_ptr,
@@ -1568,7 +1568,7 @@ public:
                                   task->rect.w-task->rect.y);
 
                void *args[] = {&task->render_buffer.samples,
-                               &task->tiles_mem.device_pointer,
+                               &task->tile_info_mem.device_pointer,
                                &mean_offset,
                                &variance_offset,
                                &mean_ptr,
@@ -1622,7 +1622,7 @@ public:
                denoising.functions.combine_halves = function_bind(&CUDADevice::denoising_combine_halves, this, _1, _2, _3, _4, _5, _6, &denoising);
                denoising.functions.get_feature = function_bind(&CUDADevice::denoising_get_feature, this, _1, _2, _3, _4, &denoising);
                denoising.functions.detect_outliers = function_bind(&CUDADevice::denoising_detect_outliers, this, _1, _2, _3, _4, &denoising);
-               denoising.functions.set_tiles = function_bind(&CUDADevice::denoising_set_tiles, this, _1, &denoising);
+               denoising.functions.set_tile_info = function_bind(&CUDADevice::denoising_set_tile_info, this, _1, &denoising);
 
                denoising.filter_area = make_int4(rtile.x, rtile.y, rtile.w, rtile.h);
                denoising.render_buffer.samples = rtile.sample;
index fe6b53fc3740b431d0d985697544fbd61b997fc6..318b14ab49991b48771e4e7005a8f6b72f63ac9e 100644 (file)
@@ -21,7 +21,7 @@
 CCL_NAMESPACE_BEGIN
 
 DenoisingTask::DenoisingTask(Device *device, const DeviceTask &task)
-: tiles_mem(device, "denoising tiles_mem", MEM_READ_WRITE),
+: tile_info_mem(device, "denoising tile info mem", MEM_READ_WRITE),
   storage(device),
   buffer(device),
   device(device)
@@ -55,33 +55,33 @@ DenoisingTask::~DenoisingTask()
        storage.temporary_2.free();
        storage.temporary_color.free();
        buffer.mem.free();
-       tiles_mem.free();
+       tile_info_mem.free();
 }
 
 void DenoisingTask::set_render_buffer(RenderTile *rtiles)
 {
-       tiles = (TilesInfo*) tiles_mem.alloc(sizeof(TilesInfo)/sizeof(int));
+       tile_info = (TileInfo*) tile_info_mem.alloc(sizeof(TileInfo)/sizeof(int));
 
        device_ptr buffers[9];
        for(int i = 0; i < 9; i++) {
                buffers[i] = rtiles[i].buffer;
-               tiles->offsets[i] = rtiles[i].offset;
-               tiles->strides[i] = rtiles[i].stride;
+               tile_info->offsets[i] = rtiles[i].offset;
+               tile_info->strides[i] = rtiles[i].stride;
        }
-       tiles->x[0] = rtiles[3].x;
-       tiles->x[1] = rtiles[4].x;
-       tiles->x[2] = rtiles[5].x;
-       tiles->x[3] = rtiles[5].x + rtiles[5].w;
-       tiles->y[0] = rtiles[1].y;
-       tiles->y[1] = rtiles[4].y;
-       tiles->y[2] = rtiles[7].y;
-       tiles->y[3] = rtiles[7].y + rtiles[7].h;
+       tile_info->x[0] = rtiles[3].x;
+       tile_info->x[1] = rtiles[4].x;
+       tile_info->x[2] = rtiles[5].x;
+       tile_info->x[3] = rtiles[5].x + rtiles[5].w;
+       tile_info->y[0] = rtiles[1].y;
+       tile_info->y[1] = rtiles[4].y;
+       tile_info->y[2] = rtiles[7].y;
+       tile_info->y[3] = rtiles[7].y + rtiles[7].h;
 
        target_buffer.offset = rtiles[9].offset;
        target_buffer.stride = rtiles[9].stride;
        target_buffer.ptr    = rtiles[9].buffer;
 
-       functions.set_tiles(buffers);
+       functions.set_tile_info(buffers);
 }
 
 void DenoisingTask::setup_denoising_buffer()
@@ -89,7 +89,7 @@ void DenoisingTask::setup_denoising_buffer()
        /* Expand filter_area by radius pixels and clamp the result to the extent of the neighboring tiles */
        rect = rect_from_shape(filter_area.x, filter_area.y, filter_area.z, filter_area.w);
        rect = rect_expand(rect, radius);
-       rect = rect_clip(rect, make_int4(tiles->x[0], tiles->y[0], tiles->x[3], tiles->y[3]));
+       rect = rect_clip(rect, make_int4(tile_info->x[0], tile_info->y[0], tile_info->x[3], tile_info->y[3]));
 
        buffer.passes = 14;
        buffer.width = rect.z - rect.x;
index 21af1b10fc5d96de8b47d0eeaf9accf7917b7438..1063d43d0397b8ffa2d6b5ed1404ff2c8e0128ea 100644 (file)
@@ -48,8 +48,8 @@ public:
                device_ptr ptr;
        } target_buffer;
 
-       TilesInfo *tiles;
-       device_vector<int> tiles_mem;
+       TileInfo *tile_info;
+       device_vector<int> tile_info_mem;
 
        int4 rect;
        int4 filter_area;
@@ -89,7 +89,7 @@ public:
                              device_ptr depth_ptr,
                              device_ptr output_ptr
                              )> detect_outliers;
-               function<bool(device_ptr*)> set_tiles;
+               function<bool(device_ptr*)> set_tile_info;
                function<void(RenderTile *rtiles)> map_neighbor_tiles;
                function<void(RenderTile *rtiles)> unmap_neighbor_tiles;
        } functions;
index 7526f1e15a1a430d2fcc33a54159b0dae3a0882d..c550d738bd50fc0bd0de0d8029ff8d75bd7fa456 100644 (file)
@@ -436,8 +436,8 @@ protected:
                                       device_ptr depth_ptr,
                                       device_ptr output_ptr,
                                       DenoisingTask *task);
-       bool denoising_set_tiles(device_ptr *buffers,
-                                DenoisingTask *task);
+       bool denoising_set_tile_info(device_ptr *buffers,
+                                    DenoisingTask *task);
 
        device_ptr mem_alloc_sub_ptr(device_memory& mem, int offset, int size);
        void mem_free_sub_ptr(device_ptr ptr);
index 4e49e0ef1669d98bb3692d4d3a1cb5e49c085fce..50d371e4c55fe930f7bedc77aef6359041684216 100644 (file)
@@ -246,7 +246,7 @@ bool OpenCLDeviceBase::load_kernels(const DeviceRequestedFeatures& requested_fea
        denoising_program.add_kernel(ustring("filter_nlm_normalize"));
        denoising_program.add_kernel(ustring("filter_nlm_construct_gramian"));
        denoising_program.add_kernel(ustring("filter_finalize"));
-       denoising_program.add_kernel(ustring("filter_set_tiles"));
+       denoising_program.add_kernel(ustring("filter_set_tile_info"));
 
        vector<OpenCLProgram*> programs;
        programs.push_back(&base_program);
@@ -977,13 +977,13 @@ bool OpenCLDeviceBase::denoising_divide_shadow(device_ptr a_ptr,
        cl_mem sv_variance_mem = CL_MEM_PTR(sv_variance_ptr);
        cl_mem buffer_variance_mem = CL_MEM_PTR(buffer_variance_ptr);
 
-       cl_mem tiles_mem = CL_MEM_PTR(task->tiles_mem.device_pointer);
+       cl_mem tile_info_mem = CL_MEM_PTR(task->tile_info_mem.device_pointer);
 
        cl_kernel ckFilterDivideShadow = denoising_program(ustring("filter_divide_shadow"));
 
        kernel_set_args(ckFilterDivideShadow, 0,
                        task->render_buffer.samples,
-                       tiles_mem,
+                       tile_info_mem,
                        a_mem,
                        b_mem,
                        sample_variance_mem,
@@ -1008,13 +1008,13 @@ bool OpenCLDeviceBase::denoising_get_feature(int mean_offset,
        cl_mem mean_mem = CL_MEM_PTR(mean_ptr);
        cl_mem variance_mem = CL_MEM_PTR(variance_ptr);
 
-       cl_mem tiles_mem = CL_MEM_PTR(task->tiles_mem.device_pointer);
+       cl_mem tile_info_mem = CL_MEM_PTR(task->tile_info_mem.device_pointer);
 
        cl_kernel ckFilterGetFeature = denoising_program(ustring("filter_get_feature"));
 
        kernel_set_args(ckFilterGetFeature, 0,
                        task->render_buffer.samples,
-                       tiles_mem,
+                       tile_info_mem,
                        mean_offset,
                        variance_offset,
                        mean_mem,
@@ -1056,29 +1056,29 @@ bool OpenCLDeviceBase::denoising_detect_outliers(device_ptr image_ptr,
        return true;
 }
 
-bool OpenCLDeviceBase::denoising_set_tiles(device_ptr *buffers,
-                                           DenoisingTask *task)
+bool OpenCLDeviceBase::denoising_set_tile_info(device_ptr *buffers,
+                                               DenoisingTask *task)
 {
-       task->tiles_mem.copy_to_device();
+       task->tile_info_mem.copy_to_device();
 
-       cl_mem tiles_mem = CL_MEM_PTR(task->tiles_mem.device_pointer);
+       cl_mem tile_info_mem = CL_MEM_PTR(task->tile_info_mem.device_pointer);
 
-       cl_kernel ckFilterSetTiles = denoising_program(ustring("filter_set_tiles"));
+       cl_kernel ckFilterSetTileInfo = denoising_program(ustring("filter_set_tile_info"));
 
-       kernel_set_args(ckFilterSetTiles, 0, tiles_mem);
+       kernel_set_args(ckFilterSetTileInfo, 0, tile_info_mem);
        for(int i = 0; i < 9; i++) {
                cl_mem buffer_mem = CL_MEM_PTR(buffers[i]);
-               kernel_set_args(ckFilterSetTiles, i+1, buffer_mem);
+               kernel_set_args(ckFilterSetTileInfo, i+1, buffer_mem);
        }
 
-       enqueue_kernel(ckFilterSetTiles, 1, 1);
+       enqueue_kernel(ckFilterSetTileInfo, 1, 1);
 
        return true;
 }
 
 void OpenCLDeviceBase::denoise(RenderTile &rtile, DenoisingTask& denoising)
 {
-       denoising.functions.set_tiles = function_bind(&OpenCLDeviceBase::denoising_set_tiles, this, _1, &denoising);
+       denoising.functions.set_tile_info = function_bind(&OpenCLDeviceBase::denoising_set_tile_info, this, _1, &denoising);
        denoising.functions.construct_transform = function_bind(&OpenCLDeviceBase::denoising_construct_transform, this, &denoising);
        denoising.functions.reconstruct = function_bind(&OpenCLDeviceBase::denoising_reconstruct, this, _1, _2, _3, &denoising);
        denoising.functions.divide_shadow = function_bind(&OpenCLDeviceBase::denoising_divide_shadow, this, _1, _2, _3, _4, _5, &denoising);
index ce96f733afff8979cee0e66a5250c2b27390bf3a..57d3d90594feb1cc7b80e10f58ca94b98c2af321 100644 (file)
@@ -22,7 +22,7 @@
 #define XTWX_SIZE      (((DENOISE_FEATURES+1)*(DENOISE_FEATURES+2))/2)
 #define XTWY_SIZE      (DENOISE_FEATURES+1)
 
-typedef struct TilesInfo {
+typedef struct TileInfo {
        int offsets[9];
        int strides[9];
        int x[4];
@@ -33,6 +33,6 @@ typedef struct TilesInfo {
 #else
        long long int buffers[9];
 #endif
-} TilesInfo;
+} TileInfo;
 
 #endif /* __FILTER_DEFINES_H__*/
index 4af209341f6bf2c736a1b1480f1e9668f6b5c6c1..9513bf46bd7278c5eb1ef34eaa782e3ca1eb2ee8 100644 (file)
@@ -26,7 +26,7 @@ CCL_NAMESPACE_BEGIN
  * bufferVariance: The buffer-based variance of the shadow feature. Unbiased, but quite noisy.
  */
 ccl_device void kernel_filter_divide_shadow(int sample,
-                                            ccl_global TilesInfo *tiles,
+                                            ccl_global TileInfo *tile_info,
                                             int x, int y,
                                             ccl_global float *unfilteredA,
                                             ccl_global float *unfilteredB,
@@ -37,13 +37,13 @@ ccl_device void kernel_filter_divide_shadow(int sample,
                                             int buffer_pass_stride,
                                             int buffer_denoising_offset)
 {
-       int xtile = (x < tiles->x[1])? 0: ((x < tiles->x[2])? 1: 2);
-       int ytile = (y < tiles->y[1])? 0: ((y < tiles->y[2])? 1: 2);
+       int xtile = (x < tile_info->x[1])? 0: ((x < tile_info->x[2])? 1: 2);
+       int ytile = (y < tile_info->y[1])? 0: ((y < tile_info->y[2])? 1: 2);
        int tile = ytile*3+xtile;
 
-       int offset = tiles->offsets[tile];
-       int stride = tiles->strides[tile];
-       const ccl_global float *ccl_restrict center_buffer = (ccl_global float*) tiles->buffers[tile];
+       int offset = tile_info->offsets[tile];
+       int stride = tile_info->strides[tile];
+       const ccl_global float *ccl_restrict center_buffer = (ccl_global float*) tile_info->buffers[tile];
        center_buffer += (y*stride + x + offset)*buffer_pass_stride;
        center_buffer += buffer_denoising_offset + 14;
 
@@ -79,7 +79,7 @@ ccl_device void kernel_filter_divide_shadow(int sample,
  * - rect: The prefilter area (lower pixels inclusive, upper pixels exclusive).
  */
 ccl_device void kernel_filter_get_feature(int sample,
-                                          ccl_global TilesInfo *tiles,
+                                          ccl_global TileInfo *tile_info,
                                           int m_offset, int v_offset,
                                           int x, int y,
                                           ccl_global float *mean,
@@ -87,10 +87,10 @@ ccl_device void kernel_filter_get_feature(int sample,
                                           int4 rect, int buffer_pass_stride,
                                           int buffer_denoising_offset)
 {
-       int xtile = (x < tiles->x[1])? 0: ((x < tiles->x[2])? 1: 2);
-       int ytile = (y < tiles->y[1])? 0: ((y < tiles->y[2])? 1: 2);
+       int xtile = (x < tile_info->x[1])? 0: ((x < tile_info->x[2])? 1: 2);
+       int ytile = (y < tile_info->y[1])? 0: ((y < tile_info->y[2])? 1: 2);
        int tile = ytile*3+xtile;
-       ccl_global float *center_buffer = ((ccl_global float*) tiles->buffers[tile]) + (tiles->offsets[tile] + y*tiles->strides[tile] + x)*buffer_pass_stride + buffer_denoising_offset;
+       ccl_global float *center_buffer = ((ccl_global float*) tile_info->buffers[tile]) + (tile_info->offsets[tile] + y*tile_info->strides[tile] + x)*buffer_pass_stride + buffer_denoising_offset;
 
        int buffer_w = align_up(rect.z - rect.x, 4);
        int idx = (y-rect.y)*buffer_w + (x - rect.x);
index 4231aba88d7b8a09bb8878afbe7133cd12c9daf0..b62aa9663ec5280245ac6f2886e70fdd9ba49cf2 100644 (file)
@@ -17,7 +17,7 @@
 /* Templated common declaration part of all CPU kernels. */
 
 void KERNEL_FUNCTION_FULL_NAME(filter_divide_shadow)(int sample,
-                                                     TilesInfo *tiles,
+                                                     TileInfo *tile_info,
                                                      int x,
                                                      int y,
                                                      float *unfilteredA,
@@ -30,7 +30,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_divide_shadow)(int sample,
                                                      int buffer_denoising_offset);
 
 void KERNEL_FUNCTION_FULL_NAME(filter_get_feature)(int sample,
-                                                   TilesInfo *tiles,
+                                                   TileInfo *tile_info,
                                                    int m_offset,
                                                    int v_offset,
                                                    int x,
index 504622ecfd976d8ae4365f5ad551c77090f8361d..26777fdabb2b1dac49e2d125bc807200c60a3897 100644 (file)
@@ -34,7 +34,7 @@ CCL_NAMESPACE_BEGIN
 /* Denoise filter */
 
 void KERNEL_FUNCTION_FULL_NAME(filter_divide_shadow)(int sample,
-                                                     TilesInfo *tiles,
+                                                     TileInfo *tile_info,
                                                      int x,
                                                      int y,
                                                      float *unfilteredA,
@@ -49,7 +49,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_divide_shadow)(int sample,
 #ifdef KERNEL_STUB
        STUB_ASSERT(KERNEL_ARCH, filter_divide_shadow);
 #else
-       kernel_filter_divide_shadow(sample, tiles,
+       kernel_filter_divide_shadow(sample, tile_info,
                                    x, y,
                                    unfilteredA,
                                    unfilteredB,
@@ -63,7 +63,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_divide_shadow)(int sample,
 }
 
 void KERNEL_FUNCTION_FULL_NAME(filter_get_feature)(int sample,
-                                                   TilesInfo *tiles,
+                                                   TileInfo *tile_info,
                                                    int m_offset,
                                                    int v_offset,
                                                    int x,
@@ -76,7 +76,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_get_feature)(int sample,
 #ifdef KERNEL_STUB
        STUB_ASSERT(KERNEL_ARCH, filter_get_feature);
 #else
-       kernel_filter_get_feature(sample, tiles,
+       kernel_filter_get_feature(sample, tile_info,
                                  m_offset, v_offset,
                                  x, y,
                                  mean, variance,
index 035f0484488c23680a2bc3c55a693c97a9e584b8..0561c40e6b18ba5b15143f46a9ef119d820265cd 100644 (file)
@@ -29,7 +29,7 @@
 extern "C" __global__ void
 CUDA_LAUNCH_BOUNDS(CUDA_THREADS_BLOCK_WIDTH, CUDA_KERNEL_MAX_REGISTERS)
 kernel_cuda_filter_divide_shadow(int sample,
-                                 TilesInfo *tiles,
+                                 TileInfo *tile_info,
                                  float *unfilteredA,
                                  float *unfilteredB,
                                  float *sampleVariance,
@@ -43,7 +43,7 @@ kernel_cuda_filter_divide_shadow(int sample,
        int y = prefilter_rect.y + blockDim.y*blockIdx.y + threadIdx.y;
        if(x < prefilter_rect.z && y < prefilter_rect.w) {
                kernel_filter_divide_shadow(sample,
-                                           tiles,
+                                           tile_info,
                                            x, y,
                                            unfilteredA,
                                            unfilteredB,
@@ -59,7 +59,7 @@ kernel_cuda_filter_divide_shadow(int sample,
 extern "C" __global__ void
 CUDA_LAUNCH_BOUNDS(CUDA_THREADS_BLOCK_WIDTH, CUDA_KERNEL_MAX_REGISTERS)
 kernel_cuda_filter_get_feature(int sample,
-                               TilesInfo *tiles,
+                               TileInfo *tile_info,
                                int m_offset,
                                int v_offset,
                                float *mean,
@@ -72,7 +72,7 @@ kernel_cuda_filter_get_feature(int sample,
        int y = prefilter_rect.y + blockDim.y*blockIdx.y + threadIdx.y;
        if(x < prefilter_rect.z && y < prefilter_rect.w) {
                kernel_filter_get_feature(sample,
-                                         tiles,
+                                         tile_info,
                                          m_offset, v_offset,
                                          x, y,
                                          mean, variance,
index 2b77807c38bff6dbc3414c4ec26e912ff4e5b051..d553ee6833ccdcc8d95a52cfb808ec94721ef1d9 100644 (file)
@@ -23,7 +23,7 @@
 /* kernels */
 
 __kernel void kernel_ocl_filter_divide_shadow(int sample,
-                                              ccl_global TilesInfo *tiles,
+                                              ccl_global TileInfo *tile_info,
                                               ccl_global float *unfilteredA,
                                               ccl_global float *unfilteredB,
                                               ccl_global float *sampleVariance,
@@ -51,7 +51,7 @@ __kernel void kernel_ocl_filter_divide_shadow(int sample,
 }
 
 __kernel void kernel_ocl_filter_get_feature(int sample,
-                                            ccl_global TilesInfo *tiles,
+                                            ccl_global TileInfo *tile_info,
                                             int m_offset,
                                             int v_offset,
                                             ccl_global float *mean,
@@ -277,26 +277,26 @@ __kernel void kernel_ocl_filter_finalize(ccl_global float *buffer,
        }
 }
 
-__kernel void kernel_ocl_filter_set_tiles(ccl_global TilesInfo* tiles,
-                                          ccl_global float *buffer_1,
-                                          ccl_global float *buffer_2,
-                                          ccl_global float *buffer_3,
-                                          ccl_global float *buffer_4,
-                                          ccl_global float *buffer_5,
-                                          ccl_global float *buffer_6,
-                                          ccl_global float *buffer_7,
-                                          ccl_global float *buffer_8,
-                                          ccl_global float *buffer_9)
+__kernel void kernel_ocl_filter_set_tile_info(ccl_global TileInfo* tile_info,
+                                              ccl_global float *buffer_1,
+                                              ccl_global float *buffer_2,
+                                              ccl_global float *buffer_3,
+                                              ccl_global float *buffer_4,
+                                              ccl_global float *buffer_5,
+                                              ccl_global float *buffer_6,
+                                              ccl_global float *buffer_7,
+                                              ccl_global float *buffer_8,
+                                              ccl_global float *buffer_9)
 {
        if((get_global_id(0) == 0) && (get_global_id(1) == 0)) {
-               tiles->buffers[0] = buffer_1;
-               tiles->buffers[1] = buffer_2;
-               tiles->buffers[2] = buffer_3;
-               tiles->buffers[3] = buffer_4;
-               tiles->buffers[4] = buffer_5;
-               tiles->buffers[5] = buffer_6;
-               tiles->buffers[6] = buffer_7;
-               tiles->buffers[7] = buffer_8;
-               tiles->buffers[8] = buffer_9;
+               tile_info->buffers[0] = buffer_1;
+               tile_info->buffers[1] = buffer_2;
+               tile_info->buffers[2] = buffer_3;
+               tile_info->buffers[3] = buffer_4;
+               tile_info->buffers[4] = buffer_5;
+               tile_info->buffers[5] = buffer_6;
+               tile_info->buffers[6] = buffer_7;
+               tile_info->buffers[7] = buffer_8;
+               tile_info->buffers[8] = buffer_9;
        }
 }