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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-04-13 09:58:52 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-04-13 09:58:52 +0300
commit84c68dcb3fbd172626e2f58a2b2d8f9390520b48 (patch)
tree4837f821adc930a36e4759db5154cc06f017cab0 /intern/cycles
parentc1a27a76cf9f40ab9dabb5888ee535e585444fcd (diff)
Cycles: Minor cleanup, whitespace around keyword and preprocessor indent
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/blender/blender_session.cpp2
-rw-r--r--intern/cycles/kernel/closure/bssrdf.h2
-rw-r--r--intern/cycles/kernel/svm/svm_voxel.h4
-rw-r--r--intern/cycles/subd/subd_patch.cpp4
-rw-r--r--intern/cycles/test/util_task_test.cpp6
-rw-r--r--intern/cycles/util/util_optimization.h72
-rw-r--r--intern/cycles/util/util_path.cpp6
7 files changed, 48 insertions, 48 deletions
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index 7dfe94127e9..fc94393bd60 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 a3ca58461ad..c24720cefbe 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 a086d321399..85ba2f906fa 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 3b0fb5b9f3a..60a78016054 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 e2860d8f8db..2268206b214 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 1fef0bd044e..adc141a7b28 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 7b936d341d1..83754728dbe 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);
}