diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-09 21:22:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-09 21:22:52 +0400 |
commit | 0fbb6bff27139d66951fe223ff322c609d368a18 (patch) | |
tree | e75d0d4399e4b82746f4edbc0c2e20e8c25f7015 /intern/cycles/util | |
parent | 2f60d9b0b9af1df967e29fd1822d82ffd2450d0f (diff) |
style cleanup: block comments
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_cuda.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/util/util_md5.cpp | 26 | ||||
-rw-r--r-- | intern/cycles/util/util_opencl.h | 98 | ||||
-rw-r--r-- | intern/cycles/util/util_path.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/util/util_system.cpp | 12 | ||||
-rw-r--r-- | intern/cycles/util/util_task.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_thread.h | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_transform.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_transform.h | 2 |
9 files changed, 78 insertions, 74 deletions
diff --git a/intern/cycles/util/util_cuda.cpp b/intern/cycles/util/util_cuda.cpp index f81a11ba9da..2960022fd8d 100644 --- a/intern/cycles/util/util_cuda.cpp +++ b/intern/cycles/util/util_cuda.cpp @@ -326,8 +326,8 @@ bool cuLibraryInit() CUDA_LIBRARY_FIND(cuCtxGetLimit); /* functions which changed 3.1 -> 3.2 for 64 bit stuff, the cuda library - has both the old ones for compatibility and new ones with _v2 postfix, - we load the _v2 ones here. */ + * has both the old ones for compatibility and new ones with _v2 postfix, + * we load the _v2 ones here. */ CUDA_LIBRARY_FIND_V2(cuDeviceTotalMem); CUDA_LIBRARY_FIND_V2(cuCtxCreate); CUDA_LIBRARY_FIND_V2(cuModuleGetGlobal); diff --git a/intern/cycles/util/util_md5.cpp b/intern/cycles/util/util_md5.cpp index 25a77f18d02..749b777efdc 100644 --- a/intern/cycles/util/util_md5.cpp +++ b/intern/cycles/util/util_md5.cpp @@ -148,7 +148,7 @@ void MD5Hash::process(const uint8_t *data /*[64]*/) /* Round 1. */ /* Let [abcd k s i] denote the operation - a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ + * a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + F(b,c,d) + X[k] + Ti;\ @@ -172,9 +172,9 @@ void MD5Hash::process(const uint8_t *data /*[64]*/) SET(b, c, d, a, 15, 22, T16); #undef SET - /* Round 2. */ - /* Let [abcd k s i] denote the operation - a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ + /* Round 2. */ + /* Let [abcd k s i] denote the operation + * a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + G(b,c,d) + X[k] + Ti;\ @@ -198,9 +198,9 @@ void MD5Hash::process(const uint8_t *data /*[64]*/) SET(b, c, d, a, 12, 20, T32); #undef SET - /* Round 3. */ - /* Let [abcd k s t] denote the operation - a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ + /* Round 3. */ + /* Let [abcd k s t] denote the operation + * a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ #define H(x, y, z) ((x) ^ (y) ^ (z)) #define SET(a, b, c, d, k, s, Ti)\ t = a + H(b,c,d) + X[k] + Ti;\ @@ -224,9 +224,9 @@ void MD5Hash::process(const uint8_t *data /*[64]*/) SET(b, c, d, a, 2, 23, T48); #undef SET - /* Round 4. */ - /* Let [abcd k s t] denote the operation - a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ + /* Round 4. */ + /* Let [abcd k s t] denote the operation + * a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + I(b,c,d) + X[k] + Ti;\ @@ -250,9 +250,9 @@ void MD5Hash::process(const uint8_t *data /*[64]*/) SET(b, c, d, a, 9, 21, T64); #undef SET - /* Then perform the following additions. (That is increment each - of the four registers by the value it had before this block - was started.) */ + /* Then perform the following additions. (That is increment each + * of the four registers by the value it had before this block + * was started.) */ abcd[0] += a; abcd[1] += b; abcd[2] += c; diff --git a/intern/cycles/util/util_opencl.h b/intern/cycles/util/util_opencl.h index 2e97097ef36..907d372d3ce 100644 --- a/intern/cycles/util/util_opencl.h +++ b/intern/cycles/util/util_opencl.h @@ -36,27 +36,27 @@ CCL_NAMESPACE_BEGIN #endif // CLCC_GENERATE_DOCUMENTATION /******************************************************************************* -* Copyright (c) 2008-2009 The Khronos Group Inc. -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and/or associated documentation files (the -* "Materials"), to deal in the Materials without restriction, including -* without limitation the rights to use, copy, modify, merge, publish, -* distribute, sublicense, and/or sell copies of the Materials, and to -* permit persons to whom the Materials are furnished to do so, subject to -* the following conditions: -* -* The above copyright notice and this permission notice shall be included -* in all copies or substantial portions of the Materials. -* -* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -******************************************************************************/ + * Copyright (c) 2008-2009 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + ******************************************************************************/ #ifndef CLCC_GENERATE_DOCUMENTATION @@ -88,20 +88,20 @@ typedef double cl_double; /* -* Vector types -* -* Note: OpenCL requires that all types be naturally aligned. -* This means that vector types must be naturally aligned. -* For example, a vector of four floats must be aligned to -* a 16 byte boundary (calculated as 4 * the natural 4-byte -* alignment of the float). The alignment qualifiers here -* will only function properly if your compiler supports them -* and if you don't actively work to defeat them. For example, -* in order for a cl_float4 to be 16 byte aligned in a struct, -* the start of the struct must itself be 16-byte aligned. -* -* Maintaining proper alignment is the user's responsibility. -*/ + * Vector types + * + * Note: OpenCL requires that all types be naturally aligned. + * This means that vector types must be naturally aligned. + * For example, a vector of four floats must be aligned to + * a 16 byte boundary (calculated as 4 * the natural 4-byte + * alignment of the float). The alignment qualifiers here + * will only function properly if your compiler supports them + * and if you don't actively work to defeat them. For example, + * in order for a cl_float4 to be 16 byte aligned in a struct, + * the start of the struct must itself be 16-byte aligned. + * + * Maintaining proper alignment is the user's responsibility. + */ typedef signed __int8 cl_char2[2]; typedef signed __int8 cl_char4[4]; typedef signed __int8 cl_char8[8]; @@ -168,20 +168,20 @@ typedef float cl_float __attribute__((aligned(4))); typedef double cl_double __attribute__((aligned(8))); /* -* Vector types -* -* Note: OpenCL requires that all types be naturally aligned. -* This means that vector types must be naturally aligned. -* For example, a vector of four floats must be aligned to -* a 16 byte boundary (calculated as 4 * the natural 4-byte -* alignment of the float). The alignment qualifiers here -* will only function properly if your compiler supports them -* and if you don't actively work to defeat them. For example, -* in order for a cl_float4 to be 16 byte aligned in a struct, -* the start of the struct must itself be 16-byte aligned. -* -* Maintaining proper alignment is the user's responsibility. -*/ + * Vector types + * + * Note: OpenCL requires that all types be naturally aligned. + * This means that vector types must be naturally aligned. + * For example, a vector of four floats must be aligned to + * a 16 byte boundary (calculated as 4 * the natural 4-byte + * alignment of the float). The alignment qualifiers here + * will only function properly if your compiler supports them + * and if you don't actively work to defeat them. For example, + * in order for a cl_float4 to be 16 byte aligned in a struct, + * the start of the struct must itself be 16-byte aligned. + * + * Maintaining proper alignment is the user's responsibility. + */ typedef int8_t cl_char2[2] __attribute__((aligned(2))); typedef int8_t cl_char4[4] __attribute__((aligned(4))); typedef int8_t cl_char8[8] __attribute__((aligned(8))); diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp index 69069a3bbce..717aa34c426 100644 --- a/intern/cycles/util/util_path.cpp +++ b/intern/cycles/util/util_path.cpp @@ -179,8 +179,8 @@ static bool path_read_text(const string& path, string& text) string path_source_replace_includes(const string& source_, const string& path) { /* our own little c preprocessor that replaces #includes with the file - contents, to work around issue of opencl drivers not supporting - include paths with spaces in them */ + * contents, to work around issue of opencl drivers not supporting + * include paths with spaces in them */ string source = source_; const string include = "#include \""; size_t n, pos = 0; diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp index ad7f3347cee..2d9f0fffae6 100644 --- a/intern/cycles/util/util_system.cpp +++ b/intern/cycles/util/util_system.cpp @@ -149,8 +149,10 @@ bool system_cpu_support_optimized() __cpuid(result, 0); num = result[0]; - /*__cpuid(result, 0x80000000); - num_ex = result[0];*/ +#if 0 + __cpuid(result, 0x80000000); + num_ex = result[0]; +#endif if(num >= 1) { __cpuid(result, 0x00000001); @@ -167,13 +169,15 @@ bool system_cpu_support_optimized() caps.fma3 = (result[2] & ((int)1 << 12)) != 0; } - /*if(num_ex >= 0x80000001) { +#if 0 + if(num_ex >= 0x80000001) { __cpuid(result, 0x80000001); caps.x64 = (result[3] & ((int)1 << 29)) != 0; caps.sse4a = (result[2] & ((int)1 << 6)) != 0; caps.fma4 = (result[2] & ((int)1 << 16)) != 0; caps.xop = (result[2] & ((int)1 << 11)) != 0; - }*/ + } +#endif caps_init = true; } diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp index 023630e8fae..ea0abd6f54f 100644 --- a/intern/cycles/util/util_task.cpp +++ b/intern/cycles/util/util_task.cpp @@ -164,7 +164,7 @@ void TaskScheduler::init(int num_threads) thread_scoped_lock lock(mutex); /* multiple cycles instances can use this task scheduler, sharing the same - threads, so we keep track of the number of users. */ + * threads, so we keep track of the number of users. */ if(users == 0) { do_exit = false; diff --git a/intern/cycles/util/util_thread.h b/intern/cycles/util/util_thread.h index 008f68e69e8..9bea4e7808a 100644 --- a/intern/cycles/util/util_thread.h +++ b/intern/cycles/util/util_thread.h @@ -34,7 +34,7 @@ typedef boost::mutex::scoped_lock thread_scoped_lock; typedef boost::condition_variable thread_condition_variable; /* own pthread based implementation, to avoid boost version conflicts with - dynamically loaded blender plugins */ + * dynamically loaded blender plugins */ class thread { public: diff --git a/intern/cycles/util/util_transform.cpp b/intern/cycles/util/util_transform.cpp index 1780994da27..860f2d4d888 100644 --- a/intern/cycles/util/util_transform.cpp +++ b/intern/cycles/util/util_transform.cpp @@ -139,7 +139,7 @@ Transform transform_inverse(const Transform& tfm) if(!transform_matrix4_gj_inverse(R, M)) { /* matrix is degenerate (e.g. 0 scale on some axis), ideally we should - never be in this situation, but try to invert it anyway with tweak */ + * never be in this situation, but try to invert it anyway with tweak */ M[0][0] += 1e-8f; M[1][1] += 1e-8f; M[2][2] += 1e-8f; diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h index b460c4c87a2..d93bbff5415 100644 --- a/intern/cycles/util/util_transform.h +++ b/intern/cycles/util/util_transform.h @@ -255,7 +255,7 @@ Transform transform_inverse(const Transform& a); __device_inline bool transform_uniform_scale(const Transform& tfm, float& scale) { /* the epsilon here is quite arbitrary, but this function is only used for - surface area and bump, where we except it to not be so sensitive */ + * surface area and bump, where we except it to not be so sensitive */ Transform ttfm = transform_transpose(tfm); float eps = 1e-6f; |