diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-27 22:15:15 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-27 22:15:15 +0300 |
commit | 5ff132182dbb089111cba3a80fa3a8eeb6009ec3 (patch) | |
tree | 016387c6917ce51dbe405489f7f5846b19faab1f /intern/cycles/device | |
parent | 6f43e1dfef3e5632976529a6f678292b15bd5a0c (diff) |
Cycles: Code cleanup, spaces around keywords
This inconsistency drove me totally crazy, it's really confusing
when it's inconsistent especially when you work on both Cycles and
Blender sides.
Shouldn;t cause merge PITA, it's whitespace changes only, Git should
be able to merge it nicely.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r-- | intern/cycles/device/device_cpu.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/device/device_cuda.cpp | 10 | ||||
-rw-r--r-- | intern/cycles/device/device_network.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/device/device_opencl.cpp | 6 | ||||
-rw-r--r-- | intern/cycles/device/device_task.cpp | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp index 70277c5aa48..148e52e2c86 100644 --- a/intern/cycles/device/device_cpu.cpp +++ b/intern/cycles/device/device_cpu.cpp @@ -209,7 +209,7 @@ public: int end_sample = tile.start_sample + tile.num_samples; for(int sample = start_sample; sample < end_sample; sample++) { - if (task.get_cancel() || task_pool.canceled()) { + if(task.get_cancel() || task_pool.canceled()) { if(task.need_finish_queue == false) break; } @@ -370,7 +370,7 @@ public: int get_split_task_count(DeviceTask& task) { - if (task.type == DeviceTask::SHADER) + if(task.type == DeviceTask::SHADER) return task.get_subtask_count(TaskScheduler::num_threads(), 256); else return task.get_subtask_count(TaskScheduler::num_threads()); diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index 407f72034b3..5afeb896ac8 100644 --- a/intern/cycles/device/device_cuda.cpp +++ b/intern/cycles/device/device_cuda.cpp @@ -331,7 +331,7 @@ public: string cubin_data; CUresult result; - if (path_read_text(cubin, cubin_data)) + if(path_read_text(cubin, cubin_data)) result = cuModuleLoadData(&cuModule, cubin_data.c_str()); else result = CUDA_ERROR_FILE_NOT_FOUND; @@ -483,7 +483,7 @@ public: if(interpolation == INTERPOLATION_CLOSEST) { cuda_assert(cuTexRefSetFilterMode(texref, CU_TR_FILTER_MODE_POINT)); } - else if (interpolation == INTERPOLATION_LINEAR) { + else if(interpolation == INTERPOLATION_LINEAR) { cuda_assert(cuTexRefSetFilterMode(texref, CU_TR_FILTER_MODE_LINEAR)); } else {/* CUBIC and SMART are unsupported for CUDA */ @@ -966,7 +966,7 @@ public: int end_sample = tile.start_sample + tile.num_samples; for(int sample = start_sample; sample < end_sample; sample++) { - if (task->get_cancel()) { + if(task->get_cancel()) { if(task->need_finish_queue == false) break; } @@ -1035,12 +1035,12 @@ bool device_cuda_init(void) static bool initialized = false; static bool result = false; - if (initialized) + if(initialized) return result; initialized = true; int cuew_result = cuewInit(); - if (cuew_result == CUEW_SUCCESS) { + if(cuew_result == CUEW_SUCCESS) { VLOG(1) << "CUEW initialization succeeded"; if(CUDADevice::have_precompiled_kernels()) { VLOG(1) << "Found precompiled kernels"; diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp index 4733482bf4e..20df2434a4a 100644 --- a/intern/cycles/device/device_network.cpp +++ b/intern/cycles/device/device_network.cpp @@ -269,7 +269,7 @@ public: lock.unlock(); TileList::iterator it = tile_list_find(the_tiles, tile); - if (it != the_tiles.end()) { + if(it != the_tiles.end()) { tile.buffers = it->buffers; the_tiles.erase(it); } diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index f11c94245d5..a77a6aaceb2 100644 --- a/intern/cycles/device/device_opencl.cpp +++ b/intern/cycles/device/device_opencl.cpp @@ -423,7 +423,7 @@ public: int num_base = 0; int total_devices = 0; - for (int platform = 0; platform < num_platforms; platform++) { + for(int platform = 0; platform < num_platforms; platform++) { cl_uint num_devices; if(opencl_error(clGetDeviceIDs(platforms[platform], opencl_device_type(), 0, NULL, &num_devices))) @@ -1125,7 +1125,7 @@ bool device_opencl_init(void) { static bool initialized = false; static bool result = false; - if (initialized) + if(initialized) return result; initialized = true; @@ -1160,7 +1160,7 @@ void device_opencl_info(vector<DeviceInfo>& devices) /* devices are numbered consecutively across platforms */ int num_base = 0; - for (int platform = 0; platform < num_platforms; platform++, num_base += num_devices) { + for(int platform = 0; platform < num_platforms; platform++, num_base += num_devices) { num_devices = 0; if(clGetDeviceIDs(platform_ids[platform], opencl_device_type(), 0, NULL, &num_devices) != CL_SUCCESS || num_devices == 0) continue; diff --git a/intern/cycles/device/device_task.cpp b/intern/cycles/device/device_task.cpp index 2fe2f334176..d527540f300 100644 --- a/intern/cycles/device/device_task.cpp +++ b/intern/cycles/device/device_task.cpp @@ -111,7 +111,7 @@ void DeviceTask::update_progress(RenderTile *rtile) if(update_tile_sample) { double current_time = time_dt(); - if (current_time - last_update_time >= 1.0) { + if(current_time - last_update_time >= 1.0) { update_tile_sample(*rtile); last_update_time = current_time; |