Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-23 04:21:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-23 04:22:25 +0300
commit3302fbaeb1d5f58d926c06b6153ec5d6f1a9b0be (patch)
tree5be399e227415fef745bcdb2b7f20a578628718b /source/blender/compositor/intern/COM_WorkScheduler.cpp
parent64b4b719ebd5201d27aa25d7fa2d765eabded9b0 (diff)
Cleanup: style, use braces for compositor
Diffstat (limited to 'source/blender/compositor/intern/COM_WorkScheduler.cpp')
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index e03a0aa6269..c3d1e0cf511 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -239,8 +239,9 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
g_program = NULL;
if (clewInit() !=
- CLEW_SUCCESS) /* this will check for errors and skip if already initialized */
+ CLEW_SUCCESS) { /* this will check for errors and skip if already initialized */
return;
+ }
if (clCreateContextFromType) {
cl_uint numberOfPlatforms = 0;
@@ -251,8 +252,9 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
else if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
- if (G.f & G_DEBUG)
+ if (G.f & G_DEBUG) {
printf("%u number of platforms\n", numberOfPlatforms);
+ }
cl_platform_id *platforms = (cl_platform_id *)MEM_mallocN(
sizeof(cl_platform_id) * numberOfPlatforms, __func__);
error = clGetPlatformIDs(numberOfPlatforms, platforms, 0);
@@ -261,8 +263,9 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
cl_platform_id platform = platforms[indexPlatform];
cl_uint numberOfDevices = 0;
clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, 0, &numberOfDevices);
- if (numberOfDevices <= 0)
+ if (numberOfDevices <= 0) {
continue;
+ }
cl_device_id *cldevices = (cl_device_id *)MEM_mallocN(
sizeof(cl_device_id) * numberOfDevices, __func__);