Cycles: Minor cleanup, whitespace around keyword and preprocessor indent
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 13 Apr 2016 06:58:52 +0000 (08:58 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 13 Apr 2016 06:58:52 +0000 (08:58 +0200)
intern/cycles/blender/blender_session.cpp
intern/cycles/kernel/closure/bssrdf.h
intern/cycles/kernel/svm/svm_voxel.h
intern/cycles/subd/subd_patch.cpp
intern/cycles/test/util_task_test.cpp
intern/cycles/util/util_optimization.h
intern/cycles/util/util_path.cpp

index 7dfe94127e99e346b4bb5a4dcdd2780a4d0852f3..fc94393bd605f8b180efc026230cc121a59f342a 100644 (file)
@@ -643,7 +643,7 @@ void BlenderSession::bake(BL::Object& b_object,
        bake_pass_filter = BakeManager::shader_type_to_pass_filter(shader_type, bake_pass_filter);
 
        /* force use_light_pass to be true if we bake more than just colors */
-       if (bake_pass_filter & ~BAKE_FILTER_COLOR) {
+       if(bake_pass_filter & ~BAKE_FILTER_COLOR) {
                Pass::add(PASS_LIGHT, scene->film->passes);
        }
 
index a3ca58461adcf23ebf08a3d0dd25ad8f19983cfe..c24720cefbe0849dad9d0032ec3f06db5f1b491f 100644 (file)
@@ -250,7 +250,7 @@ ccl_device float bssrdf_burley_root_find(float xi)
         * corner case.
         */
        float r;
-       if (xi <= 0.9f) {
+       if(xi <= 0.9f) {
                r = expf(xi * xi * 2.4f) - 1.0f;
        }
        else {
index a086d3213995d5a6eef2e3caa45d93d5d87bb7e3..85ba2f906fa744bc57b55f35f4c52683845fb3d8 100644 (file)
@@ -50,9 +50,9 @@ ccl_device void svm_node_tex_voxel(KernelGlobals *kg,
 #else
        float4 r = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
 #endif
-       if (stack_valid(density_out_offset))
+       if(stack_valid(density_out_offset))
                stack_store_float(stack, density_out_offset, r.w);
-       if (stack_valid(color_out_offset))
+       if(stack_valid(color_out_offset))
                stack_store_float3(stack, color_out_offset, make_float3(r.x, r.y, r.z));
 }
 
index 3b0fb5b9f3a69cfffc0ba524e3f05f0e3ba8e90a..60a7801605486f26be74ee5bbe928b631c217ec8 100644 (file)
@@ -114,11 +114,11 @@ BoundBox LinearTrianglePatch::bound()
 
 void BicubicPatch::eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, float u, float v)
 {
-       if (N) {
+       if(N) {
                float3 dPdu_, dPdv_;
                decasteljau_bicubic(P, &dPdu_, &dPdv_, hull, u, v);
 
-               if (dPdu && dPdv) {
+               if(dPdu && dPdv) {
                        *dPdu = dPdu_;
                        *dPdv = dPdv_;
                }
index e2860d8f8db9148bee69ac0d2f79d2aa0d474300..2268206b214bdcb0143fd8492e239f2c7aed7ea8 100644 (file)
@@ -30,7 +30,7 @@ void task_run() {
 TEST(util_task, basic) {
        TaskScheduler::init(0);
        TaskPool pool;
-       for (int i = 0; i < 100; ++i) {
+       for(int i = 0; i < 100; ++i) {
                pool.push(function_bind(task_run));
        }
        TaskPool::Summary summary;
@@ -40,10 +40,10 @@ TEST(util_task, basic) {
 }
 
 TEST(util_task, multiple_times) {
-       for (int N = 0; N < 1000; ++N) {
+       for(int N = 0; N < 1000; ++N) {
                TaskScheduler::init(0);
                TaskPool pool;
-               for (int i = 0; i < 100; ++i) {
+               for(int i = 0; i < 100; ++i) {
                        pool.push(function_bind(task_run));
                }
                TaskPool::Summary summary;
index 1fef0bd044e97cf131c971b34e08f4418bd235ed..adc141a7b284cb4a5a43692a69fd53d3752aed42 100644 (file)
 
 #if defined(i386) || defined(_M_IX86)
 
-#ifdef WITH_KERNEL_SSE2
-#define WITH_CYCLES_OPTIMIZED_KERNEL_SSE2
-#endif
+#  ifdef WITH_KERNEL_SSE2
+#    define WITH_CYCLES_OPTIMIZED_KERNEL_SSE2
+#  endif
 
-#ifdef WITH_KERNEL_SSE3
-#define WITH_CYCLES_OPTIMIZED_KERNEL_SSE3
-#endif
+#  ifdef WITH_KERNEL_SSE3
+#    define WITH_CYCLES_OPTIMIZED_KERNEL_SSE3
+#  endif
 
-#endif
+#endif  /* defined(i386) || defined(_M_IX86) */
 
 /* x86-64
  *
 #if defined(__x86_64__) || defined(_M_X64)
 
 /* SSE2 is always available on x86-64 CPUs, so auto enable */
-#define __KERNEL_SSE2__
+#  define __KERNEL_SSE2__
 
 /* no SSE2 kernel on x86-64, part of regular kernel */
-#ifdef WITH_KERNEL_SSE3
-#define WITH_CYCLES_OPTIMIZED_KERNEL_SSE3
-#endif
+#  ifdef WITH_KERNEL_SSE3
+#    define WITH_CYCLES_OPTIMIZED_KERNEL_SSE3
+#  endif
 
-#ifdef WITH_KERNEL_SSE41
-#define WITH_CYCLES_OPTIMIZED_KERNEL_SSE41
-#endif
+#  ifdef WITH_KERNEL_SSE41
+#    define WITH_CYCLES_OPTIMIZED_KERNEL_SSE41
+#  endif
 
-#ifdef WITH_KERNEL_AVX
-#define WITH_CYCLES_OPTIMIZED_KERNEL_AVX
-#endif
+#  ifdef WITH_KERNEL_AVX
+#    define WITH_CYCLES_OPTIMIZED_KERNEL_AVX
+#  endif
 
-#ifdef WITH_KERNEL_AVX2
-#define WITH_CYCLES_OPTIMIZED_KERNEL_AVX2
-#endif
+#  ifdef WITH_KERNEL_AVX2
+#    define WITH_CYCLES_OPTIMIZED_KERNEL_AVX2
+#  endif
 
-#endif
+#endif  /* defined(__x86_64__) || defined(_M_X64) */
 
 /* SSE Experiment
  *
  * such as float3 and float4. Currently this gives an overall slowdown. */
 
 #if 0
-#define __KERNEL_SSE__
-#ifndef __KERNEL_SSE2__
-#define __KERNEL_SSE2__
-#endif
-#ifndef __KERNEL_SSE3__
-#define __KERNEL_SSE3__
-#endif
-#ifndef __KERNEL_SSSE3__
-#define __KERNEL_SSSE3__
-#endif
-#ifndef __KERNEL_SSE4__
-#define __KERNEL_SSE4__
-#endif
+#  define __KERNEL_SSE__
+#  ifndef __KERNEL_SSE2__
+#    define __KERNEL_SSE2__
+#  endif
+#  ifndef __KERNEL_SSE3__
+#    define __KERNEL_SSE3__
+#  endif
+#  ifndef __KERNEL_SSSE3__
+#    define __KERNEL_SSSE3__
+#  endif
+#  ifndef __KERNEL_SSE4__
+#    define __KERNEL_SSE4__
+#  endif
 #endif
 
 /* SSE Intrinsics includes
 #ifndef FREE_WINDOWS64
 
 #ifdef _MSC_VER
-#include <intrin.h>
+#  include <intrin.h>
 #elif (defined(__x86_64__) || defined(__i386__))
-#include <x86intrin.h>
+#  include <x86intrin.h>
 #endif
 
 #else
index 7b936d341d131e36b70e9149106a0dc170a9bc45..83754728dbed7acf4fd15db8e891c14aab2c8cff 100644 (file)
@@ -485,9 +485,9 @@ static string path_unc_to_short(const string& path)
                if((len > 5) && (path[5] ==  ':')) {
                        return path.substr(4, len - 4);
                }
-               else if ((len > 7) &&
-                        (path.substr(4, 3) == "UNC") &&
-                        ((path[7] ==  DIR_SEP) || (path[7] ==  DIR_SEP_ALT)))
+               else if((len > 7) &&
+                       (path.substr(4, 3) == "UNC") &&
+                       ((path[7] ==  DIR_SEP) || (path[7] ==  DIR_SEP_ALT)))
                {
                        return "\\\\" + path.substr(8, len - 8);
                }