Cycles: Fix indentation
authorMai Lavelle <mai.lavelle@gmail.com>
Tue, 7 Mar 2017 10:21:36 +0000 (05:21 -0500)
committerMai Lavelle <mai.lavelle@gmail.com>
Wed, 8 Mar 2017 06:31:32 +0000 (01:31 -0500)
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_cuda.cpp
intern/cycles/device/device_split_kernel.cpp
intern/cycles/device/opencl/opencl_base.cpp
intern/cycles/device/opencl/opencl_split.cpp
intern/cycles/kernel/split/kernel_path_init.h

index 1589bbe1a333b59e0806f70d411dd4a4708f8a8c..06a1568b4d62a513cff0450a2426d367fc5a0457 100644 (file)
@@ -236,8 +236,8 @@ public:
        {
                if(name) {
                        VLOG(1) << "Buffer allocate: " << name << ", "
-                                   << string_human_readable_number(mem.memory_size()) << " bytes. ("
-                                   << string_human_readable_size(mem.memory_size()) << ")";
+                               << string_human_readable_number(mem.memory_size()) << " bytes. ("
+                               << string_human_readable_size(mem.memory_size()) << ")";
                }
 
                mem.device_pointer = mem.data_pointer;
@@ -753,20 +753,20 @@ bool CPUSplitKernel::enqueue_split_kernel_data_init(const KernelDimensions& dim,
                                                     device_memory& work_pool_wgs)
 {
        typedef void(*data_init_t)(KernelGlobals *kg,
-                               ccl_constant KernelData *data,
-                               ccl_global void *split_data_buffer,
-                               int num_elements,
-                               ccl_global char *ray_state,
-                               ccl_global uint *rng_state,
-                               int start_sample,
-                               int end_sample,
-                               int sx, int sy, int sw, int sh, int offset, int stride,
-                               ccl_global int *Queue_index,
-                               int queuesize,
-                               ccl_global char *use_queues_flag,
-                               ccl_global unsigned int *work_pool_wgs,
-                               unsigned int num_samples,
-                               ccl_global float *buffer);
+                                  ccl_constant KernelData *data,
+                                  ccl_global void *split_data_buffer,
+                                  int num_elements,
+                                  ccl_global char *ray_state,
+                                  ccl_global uint *rng_state,
+                                  int start_sample,
+                                  int end_sample,
+                                  int sx, int sy, int sw, int sh, int offset, int stride,
+                                  ccl_global int *Queue_index,
+                                  int queuesize,
+                                  ccl_global char *use_queues_flag,
+                                  ccl_global unsigned int *work_pool_wgs,
+                                  unsigned int num_samples,
+                                  ccl_global float *buffer);
 
        data_init_t data_init;
 
@@ -812,25 +812,25 @@ bool CPUSplitKernel::enqueue_split_kernel_data_init(const KernelDimensions& dim,
                        kg->global_id = make_int2(x, y);
 
                        data_init((KernelGlobals*)kernel_globals.device_pointer,
-                                         (KernelData*)data.device_pointer,
-                                         (void*)split_data.device_pointer,
-                                         num_global_elements,
-                                         (char*)ray_state.device_pointer,
-                                         (uint*)rtile.rng_state,
-                                         rtile.start_sample,
-                                         rtile.start_sample + rtile.num_samples,
-                                         rtile.x,
-                                         rtile.y,
-                                         rtile.w,
-                                         rtile.h,
-                                         rtile.offset,
-                                         rtile.stride,
-                                         (int*)queue_index.device_pointer,
-                                         dim.global_size[0] * dim.global_size[1],
-                                         (char*)use_queues_flags.device_pointer,
-                                         (uint*)work_pool_wgs.device_pointer,
-                                         rtile.num_samples,
-                                         (float*)rtile.buffer);
+                                 (KernelData*)data.device_pointer,
+                                 (void*)split_data.device_pointer,
+                                 num_global_elements,
+                                 (char*)ray_state.device_pointer,
+                                 (uint*)rtile.rng_state,
+                                 rtile.start_sample,
+                                 rtile.start_sample + rtile.num_samples,
+                                 rtile.x,
+                                 rtile.y,
+                                 rtile.w,
+                                 rtile.h,
+                                 rtile.offset,
+                                 rtile.stride,
+                                 (int*)queue_index.device_pointer,
+                                 dim.global_size[0] * dim.global_size[1],
+                                 (char*)use_queues_flags.device_pointer,
+                                 (uint*)work_pool_wgs.device_pointer,
+                                 rtile.num_samples,
+                                 (float*)rtile.buffer);
                }
        }
 
index 0204f0ed9605ee1ecbfbdf6b3a3df24246d29b82..0fb369ba50d5292488338ed282447db098f2c422 100644 (file)
@@ -511,8 +511,8 @@ public:
        {
                if(name) {
                        VLOG(1) << "Buffer allocate: " << name << ", "
-                                   << string_human_readable_number(mem.memory_size()) << " bytes. ("
-                                   << string_human_readable_size(mem.memory_size()) << ")";
+                               << string_human_readable_number(mem.memory_size()) << " bytes. ("
+                               << string_human_readable_size(mem.memory_size()) << ")";
                }
 
                cuda_push_context();
@@ -1459,9 +1459,9 @@ public:
                cuda_assert(cuFuncSetCacheConfig(func, CU_FUNC_CACHE_PREFER_L1));
 
                cuda_assert(cuLaunchKernel(func,
-                                              xblocks , yblocks, 1, /* blocks */
-                                              xthreads, ythreads, 1, /* threads */
-                                              0, 0, args, 0));
+                                          xblocks , yblocks, 1, /* blocks */
+                                          xthreads, ythreads, 1, /* threads */
+                                          0, 0, args, 0));
 
                device->cuda_pop_context();
 
@@ -1498,9 +1498,9 @@ size_t CUDASplitKernel::state_buffer_size(device_memory& /*kg*/, device_memory&
        cuda_assert(cuModuleGetFunction(&state_buffer_size, device->cuModule, "kernel_cuda_state_buffer_size"));
 
        cuda_assert(cuLaunchKernel(state_buffer_size,
-                                      1, 1, 1,
-                                      1, 1, 1,
-                                      0, 0, &args, 0));
+                                  1, 1, 1,
+                                  1, 1, 1,
+                                  0, 0, &args, 0));
 
        device->cuda_pop_context();
 
index 799479ddb6ad0efd68d57bbe75218d9675190f75..1d58bfda117765d8ea57c31de0d5ebcd56da2878 100644 (file)
@@ -192,16 +192,15 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task,
                device->mem_zero(split_data);
 
                if(!enqueue_split_kernel_data_init(KernelDimensions(global_size, local_size),
-                                                          subtile,
-                                                          num_global_elements,
-                                                          kgbuffer,
-                                                          kernel_data,
-                                                          split_data,
-                                                          ray_state,
-                                                          queue_index,
-                                                          use_queues_flag,
-                                                          work_pool_wgs
-                                                          ))
+                                                  subtile,
+                                                  num_global_elements,
+                                                  kgbuffer,
+                                                  kernel_data,
+                                                  split_data,
+                                                  ray_state,
+                                                  queue_index,
+                                                  use_queues_flag,
+                                                  work_pool_wgs))
                {
                        return false;
                }
index cb8b0783570651b1da2af9c0ef6c2bb31701aed7..d05259468bbff7511efc6c8c750b4f1ec4dac861 100644 (file)
@@ -336,14 +336,14 @@ void OpenCLDeviceBase::mem_zero(device_memory& mem)
                                kernel_set_args(ckZeroBuffer, 0, d_buffer, d_size, d_offset);
 
                                ciErr = clEnqueueNDRangeKernel(cqCommandQueue,
-                                                                      ckZeroBuffer,
-                                                                      2,
-                                                                      NULL,
-                                                                      global_size,
-                                                                      NULL,
-                                                                      0,
-                                                                      NULL,
-                                                                      NULL);
+                                                              ckZeroBuffer,
+                                                              2,
+                                                              NULL,
+                                                              global_size,
+                                                              NULL,
+                                                              0,
+                                                              NULL,
+                                                              NULL);
                                opencl_assert_err(ciErr, "clEnqueueNDRangeKernel");
 
                                d_offset += d_size;
@@ -363,13 +363,13 @@ void OpenCLDeviceBase::mem_zero(device_memory& mem)
                        }
 
                        opencl_assert(clEnqueueWriteBuffer(cqCommandQueue,
-                                   CL_MEM_PTR(mem.device_pointer),
-                                   CL_TRUE,
-                                   0,
-                                   mem.memory_size(),
-                                   zero,
-                                   0,
-                                   NULL, NULL));
+                                                          CL_MEM_PTR(mem.device_pointer),
+                                                          CL_TRUE,
+                                                          0,
+                                                          mem.memory_size(),
+                                                          zero,
+                                                          0,
+                                                          NULL, NULL));
 
                        if(!mem.data_pointer) {
                                util_aligned_free(zero);
index a44f5da3a32c5d18b153b8a87aa2d326ba1babad..be931599e390857e60fe013a08aebd6ecee17827 100644 (file)
@@ -128,9 +128,9 @@ public:
                        /* Keep rendering tiles until done. */
                        while(task->acquire_tile(this, tile)) {
                                split_kernel->path_trace(task,
-                                                tile,
-                                                kgbuffer,
-                                                *const_mem_map["__data"]);
+                                                        tile,
+                                                        kgbuffer,
+                                                        *const_mem_map["__data"]);
 
                                /* Complete kernel execution before release tile. */
                                /* This helps in multi-device render;
@@ -284,9 +284,9 @@ public:
                                        0,
                                        kernel_globals,
                                        kernel_data,
-                                                       split_data,
+                                       split_data,
                                        num_global_elements,
-                                                       ray_state,
+                                       ray_state,
                                        rtile.rng_state);
 
 /* TODO(sergey): Avoid map lookup here. */
@@ -311,7 +311,7 @@ public:
                                        use_queues_flag,
                                        work_pool_wgs,
                                        rtile.num_samples,
-                                                       rtile.buffer);
+                                       rtile.buffer);
 
                /* Enqueue ckPathTraceKernel_data_init kernel. */
                device->ciErr = clEnqueueNDRangeKernel(device->cqCommandQueue,
index d2e2ffaca91df1fcb43175f0f02b843e968e1c99..fe3c9e1e8a2e7c5480a857c99b02b2f77464e4e1 100644 (file)
@@ -50,9 +50,9 @@ ccl_device void kernel_path_init(KernelGlobals *kg) {
 
        /* Get pixel and tile position associated with the work. */
        get_work_pixel_tile_position(kg, &pixel_x, &pixel_y,
-                               &tile_x, &tile_y,
-                               work_index,
-                               ray_index);
+                                    &tile_x, &tile_y,
+                                    work_index,
+                                    ray_index);
        kernel_split_state.work_array[ray_index] = work_index;
 
        ccl_global uint *rng_state = kernel_split_params.rng_state;