[Bf-blender-cvs] [84c68dc] master: Cycles: Minor cleanup, whitespace around keyword and preprocessor indent
Sergey Sharybin
noreply at git.blender.org
Wed Apr 13 08:59:25 CEST 2016
Commit: 84c68dcb3fbd172626e2f58a2b2d8f9390520b48
Author: Sergey Sharybin
Date: Wed Apr 13 08:58:52 2016 +0200
Branches: master
https://developer.blender.org/rB84c68dcb3fbd172626e2f58a2b2d8f9390520b48
Cycles: Minor cleanup, whitespace around keyword and preprocessor indent
===================================================================
M intern/cycles/blender/blender_session.cpp
M intern/cycles/kernel/closure/bssrdf.h
M intern/cycles/kernel/svm/svm_voxel.h
M intern/cycles/subd/subd_patch.cpp
M intern/cycles/test/util_task_test.cpp
M intern/cycles/util/util_optimization.h
M intern/cycles/util/util_path.cpp
===================================================================
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index 7dfe941..fc94393 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -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);
}
diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h
index a3ca584..c24720c 100644
--- a/intern/cycles/kernel/closure/bssrdf.h
+++ b/intern/cycles/kernel/closure/bssrdf.h
@@ -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 {
diff --git a/intern/cycles/kernel/svm/svm_voxel.h b/intern/cycles/kernel/svm/svm_voxel.h
index a086d32..85ba2f9 100644
--- a/intern/cycles/kernel/svm/svm_voxel.h
+++ b/intern/cycles/kernel/svm/svm_voxel.h
@@ -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));
}
diff --git a/intern/cycles/subd/subd_patch.cpp b/intern/cycles/subd/subd_patch.cpp
index 3b0fb5b..60a7801 100644
--- a/intern/cycles/subd/subd_patch.cpp
+++ b/intern/cycles/subd/subd_patch.cpp
@@ -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_;
}
diff --git a/intern/cycles/test/util_task_test.cpp b/intern/cycles/test/util_task_test.cpp
index e2860d8..2268206 100644
--- a/intern/cycles/test/util_task_test.cpp
+++ b/intern/cycles/test/util_task_test.cpp
@@ -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;
diff --git a/intern/cycles/util/util_optimization.h b/intern/cycles/util/util_optimization.h
index 1fef0bd..adc141a 100644
--- a/intern/cycles/util/util_optimization.h
+++ b/intern/cycles/util/util_optimization.h
@@ -35,15 +35,15 @@
#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
*
@@ -52,26 +52,26 @@
#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
*
@@ -79,19 +79,19 @@
* 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
@@ -102,9 +102,9 @@
#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
diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp
index 7b936d3..8375472 100644
--- a/intern/cycles/util/util_path.cpp
+++ b/intern/cycles/util/util_path.cpp
@@ -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);
}
More information about the Bf-blender-cvs
mailing list