diff options
Diffstat (limited to 'intern/cycles/util')
44 files changed, 75 insertions, 117 deletions
diff --git a/intern/cycles/util/util_algorithm.h b/intern/cycles/util/util_algorithm.h index 5c79c00cc98..eb874713d43 100644 --- a/intern/cycles/util/util_algorithm.h +++ b/intern/cycles/util/util_algorithm.h @@ -30,4 +30,3 @@ using std::remove; CCL_NAMESPACE_END #endif /* __UTIL_ALGORITHM_H__ */ - diff --git a/intern/cycles/util/util_args.h b/intern/cycles/util/util_args.h index a53fc061758..be6f2c2b9f1 100644 --- a/intern/cycles/util/util_args.h +++ b/intern/cycles/util/util_args.h @@ -29,4 +29,3 @@ OIIO_NAMESPACE_USING CCL_NAMESPACE_END #endif /* __UTIL_ARGS_H__ */ - diff --git a/intern/cycles/util/util_boundbox.h b/intern/cycles/util/util_boundbox.h index ed94ca20211..b1bd5be0df3 100644 --- a/intern/cycles/util/util_boundbox.h +++ b/intern/cycles/util/util_boundbox.h @@ -55,7 +55,7 @@ public: { } - __forceinline void grow(const float3& pt) + __forceinline void grow(const float3& pt) { /* the order of arguments to min is such that if pt is nan, it will not * influence the resulting bounding box */ @@ -63,7 +63,7 @@ public: max = ccl::max(pt, max); } - __forceinline void grow(const float3& pt, float border) + __forceinline void grow(const float3& pt, float border) { float3 shift = make_float3(border, border, border); min = ccl::min(pt - shift, min); @@ -76,7 +76,7 @@ public: grow(bbox.max); } - __forceinline void grow_safe(const float3& pt) + __forceinline void grow_safe(const float3& pt) { /* the order of arguments to min is such that if pt is nan, it will not * influence the resulting bounding box */ @@ -86,7 +86,7 @@ public: } } - __forceinline void grow_safe(const float3& pt, float border) + __forceinline void grow_safe(const float3& pt, float border) { if(isfinite(pt.x) && isfinite(pt.y) && isfinite(pt.z) && isfinite(border)) { float3 shift = make_float3(border, border, border); @@ -101,7 +101,7 @@ public: grow_safe(bbox.max); } - __forceinline void intersect(const BoundBox& bbox) + __forceinline void intersect(const BoundBox& bbox) { min = ccl::max(min, bbox.min); max = ccl::min(max, bbox.max); @@ -283,4 +283,3 @@ public: CCL_NAMESPACE_END #endif /* __UTIL_BOUNDBOX_H__ */ - diff --git a/intern/cycles/util/util_color.h b/intern/cycles/util/util_color.h index 62a9bf8e47d..826db469d25 100644 --- a/intern/cycles/util/util_color.h +++ b/intern/cycles/util/util_color.h @@ -241,4 +241,3 @@ ccl_device float4 color_srgb_to_linear_v4(float4 c) CCL_NAMESPACE_END #endif /* __UTIL_COLOR_H__ */ - diff --git a/intern/cycles/util/util_defines.h b/intern/cycles/util/util_defines.h index 98944a19022..d994d4e08f4 100644 --- a/intern/cycles/util/util_defines.h +++ b/intern/cycles/util/util_defines.h @@ -133,4 +133,3 @@ template<typename T> static inline T decltype_helper(T x) { return x; } #endif #endif /* __UTIL_DEFINES_H__ */ - diff --git a/intern/cycles/util/util_foreach.h b/intern/cycles/util/util_foreach.h index 4f7337107b3..03fcefc67b9 100644 --- a/intern/cycles/util/util_foreach.h +++ b/intern/cycles/util/util_foreach.h @@ -27,4 +27,3 @@ #endif #endif /* __UTIL_FOREACH_H__ */ - diff --git a/intern/cycles/util/util_function.h b/intern/cycles/util/util_function.h index 6d0f0b444a9..958f8b4008c 100644 --- a/intern/cycles/util/util_function.h +++ b/intern/cycles/util/util_function.h @@ -47,4 +47,3 @@ using boost::function; CCL_NAMESPACE_END #endif /* __UTIL_FUNCTION_H__ */ - diff --git a/intern/cycles/util/util_half.h b/intern/cycles/util/util_half.h index f6c507906f3..58f3f903619 100644 --- a/intern/cycles/util/util_half.h +++ b/intern/cycles/util/util_half.h @@ -149,4 +149,3 @@ ccl_device_inline half float_to_half(float f) CCL_NAMESPACE_END #endif /* __UTIL_HALF_H__ */ - diff --git a/intern/cycles/util/util_hash.h b/intern/cycles/util/util_hash.h index 2307ca158f0..a8a5076fbb3 100644 --- a/intern/cycles/util/util_hash.h +++ b/intern/cycles/util/util_hash.h @@ -69,4 +69,3 @@ ccl_device_inline float hash_int_01(uint k) CCL_NAMESPACE_END #endif /* __UTIL_HASH_H__ */ - diff --git a/intern/cycles/util/util_list.h b/intern/cycles/util/util_list.h index 6cb27e6defe..f555b001186 100644 --- a/intern/cycles/util/util_list.h +++ b/intern/cycles/util/util_list.h @@ -26,4 +26,3 @@ using std::list; CCL_NAMESPACE_END #endif /* __UTIL_LIST_H__ */ - diff --git a/intern/cycles/util/util_map.h b/intern/cycles/util/util_map.h index 46c2885f8b0..b3d887f093c 100644 --- a/intern/cycles/util/util_map.h +++ b/intern/cycles/util/util_map.h @@ -54,4 +54,3 @@ using std::unordered_map; CCL_NAMESPACE_END #endif /* __UTIL_MAP_H__ */ - diff --git a/intern/cycles/util/util_md5.cpp b/intern/cycles/util/util_md5.cpp index 749760d84f0..7cdd28a4793 100644 --- a/intern/cycles/util/util_md5.cpp +++ b/intern/cycles/util/util_md5.cpp @@ -338,7 +338,7 @@ bool MD5Hash::append_file(const string& filepath) bool success = (ferror(f) == 0); fclose(f); - + return success; } @@ -376,7 +376,7 @@ string MD5Hash::get_hex() for(int i = 0; i < 16; i++) sprintf(buf + i*2, "%02X", (unsigned int)digest[i]); buf[sizeof(buf)-1] = '\0'; - + return string(buf); } @@ -388,4 +388,3 @@ string util_md5_string(const string& str) } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_md5.h b/intern/cycles/util/util_md5.h index b043b591e67..9023ccee4c2 100644 --- a/intern/cycles/util/util_md5.h +++ b/intern/cycles/util/util_md5.h @@ -59,4 +59,3 @@ string util_md5_string(const string& str); CCL_NAMESPACE_END #endif /* __UTIL_MD5_H__ */ - diff --git a/intern/cycles/util/util_optimization.h b/intern/cycles/util/util_optimization.h index 3c5785c4807..3b3627242d5 100644 --- a/intern/cycles/util/util_optimization.h +++ b/intern/cycles/util/util_optimization.h @@ -69,4 +69,3 @@ #endif #endif /* __UTIL_OPTIMIZATION_H__ */ - diff --git a/intern/cycles/util/util_param.h b/intern/cycles/util/util_param.h index 69bcbf80a78..246b5cb7d63 100644 --- a/intern/cycles/util/util_param.h +++ b/intern/cycles/util/util_param.h @@ -31,4 +31,3 @@ OIIO_NAMESPACE_USING CCL_NAMESPACE_END #endif /* __UTIL_PARAM_H__ */ - diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp index 0e0371928ab..51b7944705e 100644 --- a/intern/cycles/util/util_path.cpp +++ b/intern/cycles/util/util_path.cpp @@ -987,4 +987,3 @@ void path_cache_clear_except(const string& name, const set<string>& except) } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_path.h b/intern/cycles/util/util_path.h index 0e5e2d2c837..738dba94647 100644 --- a/intern/cycles/util/util_path.h +++ b/intern/cycles/util/util_path.h @@ -76,4 +76,3 @@ void path_cache_clear_except(const string& name, const set<string>& except); CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h index 134383e88db..3ef15c5c09a 100644 --- a/intern/cycles/util/util_progress.h +++ b/intern/cycles/util/util_progress.h @@ -366,4 +366,3 @@ protected: CCL_NAMESPACE_END #endif /* __UTIL_PROGRESS_H__ */ - diff --git a/intern/cycles/util/util_projection.h b/intern/cycles/util/util_projection.h index dbcb9877a48..26b4843928c 100644 --- a/intern/cycles/util/util_projection.h +++ b/intern/cycles/util/util_projection.h @@ -174,4 +174,3 @@ ccl_device_inline ProjectionTransform projection_orthographic(float znear, float CCL_NAMESPACE_END #endif /* __UTIL_PROJECTION_H__ */ - diff --git a/intern/cycles/util/util_queue.h b/intern/cycles/util/util_queue.h index f4c802785f9..622f4fe3e47 100644 --- a/intern/cycles/util/util_queue.h +++ b/intern/cycles/util/util_queue.h @@ -26,4 +26,3 @@ using std::queue; CCL_NAMESPACE_END #endif /* __UTIL_LIST_H__ */ - diff --git a/intern/cycles/util/util_rect.h b/intern/cycles/util/util_rect.h index 17a55a14d0b..d13baefe85e 100644 --- a/intern/cycles/util/util_rect.h +++ b/intern/cycles/util/util_rect.h @@ -70,4 +70,3 @@ ccl_device_inline int rect_size(int4 rect) CCL_NAMESPACE_END #endif /* __UTIL_RECT_H__ */ - diff --git a/intern/cycles/util/util_set.h b/intern/cycles/util/util_set.h index c19fa071b37..1d010e19996 100644 --- a/intern/cycles/util/util_set.h +++ b/intern/cycles/util/util_set.h @@ -60,4 +60,3 @@ using std::unordered_set; CCL_NAMESPACE_END #endif /* __UTIL_SET_H__ */ - diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h index 04341451afb..cc7f436c8fe 100644 --- a/intern/cycles/util/util_simd.h +++ b/intern/cycles/util/util_simd.h @@ -111,7 +111,7 @@ __forceinline size_t __popcnt(size_t in) { #endif __forceinline int __bsf(int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else unsigned long r = 0; _BitScanForward(&r,v); return r; @@ -119,7 +119,7 @@ __forceinline int __bsf(int v) { } __forceinline unsigned int __bsf(unsigned int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else unsigned long r = 0; _BitScanForward(&r,v); return r; @@ -143,7 +143,7 @@ __forceinline int __btr(int v, int i) { } __forceinline int bitscan(int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else return __bsf(v); @@ -156,18 +156,18 @@ __forceinline int clz(const int x) return _lzcnt_u32(x); #else if(UNLIKELY(x == 0)) return 32; - return 31 - __bsr(x); + return 31 - __bsr(x); #endif } -__forceinline int __bscf(int& v) +__forceinline int __bscf(int& v) { int i = __bsf(v); v &= v-1; return i; } -__forceinline unsigned int __bscf(unsigned int& v) +__forceinline unsigned int __bscf(unsigned int& v) { unsigned int i = __bsf(v); v &= v-1; @@ -177,7 +177,7 @@ __forceinline unsigned int __bscf(unsigned int& v) #if defined(__KERNEL_64_BIT__) __forceinline size_t __bsf(size_t v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u64(v); #else unsigned long r = 0; _BitScanForward64(&r,v); return r; @@ -212,7 +212,7 @@ __forceinline size_t bitscan(size_t v) { #endif } -__forceinline size_t __bscf(size_t& v) +__forceinline size_t __bscf(size_t& v) { size_t i = __bsf(v); v &= v-1; @@ -274,7 +274,7 @@ __forceinline size_t __btr(size_t v, size_t i) { } __forceinline int bitscan(int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else return __bsf(v); @@ -282,7 +282,7 @@ __forceinline int bitscan(int v) { } __forceinline unsigned int bitscan(unsigned int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else return __bsf(v); @@ -309,11 +309,11 @@ __forceinline int clz(const int x) return _lzcnt_u32(x); #else if(UNLIKELY(x == 0)) return 32; - return 31 - __bsr(x); + return 31 - __bsr(x); #endif } -__forceinline int __bscf(int& v) +__forceinline int __bscf(int& v) { int i = bitscan(v); #if defined(__KERNEL_AVX2__) @@ -324,7 +324,7 @@ __forceinline int __bscf(int& v) return i; } -__forceinline unsigned int __bscf(unsigned int& v) +__forceinline unsigned int __bscf(unsigned int& v) { unsigned int i = bitscan(v); v &= v-1; @@ -332,7 +332,7 @@ __forceinline unsigned int __bscf(unsigned int& v) } #if (defined(__KERNEL_64_BIT__) || defined(__APPLE__)) && !(defined(__ILP32__) && defined(__x86_64__)) -__forceinline size_t __bscf(size_t& v) +__forceinline size_t __bscf(size_t& v) { size_t i = bitscan(v); #if defined(__KERNEL_AVX2__) @@ -375,28 +375,28 @@ __forceinline __m128 _mm_blendv_ps_emu( __m128 value, __m128 input, __m128 mask) #define _mm_blend_ps _mm_blend_ps_emu __forceinline __m128 _mm_blend_ps_emu( __m128 value, __m128 input, const int mask) { - assert(mask < 0x10); return _mm_blendv_ps(value, input, _mm_lookupmask_ps[mask]); + assert(mask < 0x10); return _mm_blendv_ps(value, input, _mm_lookupmask_ps[mask]); } #undef _mm_blendv_epi8 #define _mm_blendv_epi8 _mm_blendv_epi8_emu __forceinline __m128i _mm_blendv_epi8_emu( __m128i value, __m128i input, __m128i mask) { - return _mm_or_si128(_mm_and_si128(mask, input), _mm_andnot_si128(mask, value)); + return _mm_or_si128(_mm_and_si128(mask, input), _mm_andnot_si128(mask, value)); } #undef _mm_min_epi32 #define _mm_min_epi32 _mm_min_epi32_emu __forceinline __m128i _mm_min_epi32_emu( __m128i value, __m128i input) { - return _mm_blendv_epi8(input, value, _mm_cmplt_epi32(value, input)); + return _mm_blendv_epi8(input, value, _mm_cmplt_epi32(value, input)); } #undef _mm_max_epi32 #define _mm_max_epi32 _mm_max_epi32_emu __forceinline __m128i _mm_max_epi32_emu( __m128i value, __m128i input) { - return _mm_blendv_epi8(value, input, _mm_cmplt_epi32(value, input)); + return _mm_blendv_epi8(value, input, _mm_cmplt_epi32(value, input)); } #undef _mm_extract_epi32 @@ -416,7 +416,7 @@ __forceinline int _mm_extract_epi32_emu( __m128i input, const int index) #define _mm_insert_epi32 _mm_insert_epi32_emu __forceinline __m128i _mm_insert_epi32_emu( __m128i value, int input, const int index) { - assert(index >= 0 && index < 4); ((int*)&value)[index] = input; return value; + assert(index >= 0 && index < 4); ((int*)&value)[index] = input; return value; } #undef _mm_insert_ps @@ -487,4 +487,3 @@ CCL_NAMESPACE_END #endif /* __KERNEL_GPU__ */ #endif /* __UTIL_SIMD_TYPES_H__ */ - diff --git a/intern/cycles/util/util_sky_model.cpp b/intern/cycles/util/util_sky_model.cpp index 6dda8469907..526bce4ff88 100644 --- a/intern/cycles/util/util_sky_model.cpp +++ b/intern/cycles/util/util_sky_model.cpp @@ -367,4 +367,3 @@ ArHosekSkyModelState * arhosek_xyz_skymodelstate_alloc_init( } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_sseb.h b/intern/cycles/util/util_sseb.h index 977976c3fc0..115b133c662 100644 --- a/intern/cycles/util/util_sseb.h +++ b/intern/cycles/util/util_sseb.h @@ -38,7 +38,7 @@ struct sseb //////////////////////////////////////////////////////////////////////////////// /// Constructors, Assignment & Cast Operators //////////////////////////////////////////////////////////////////////////////// - + __forceinline sseb ( ) {} __forceinline sseb ( const sseb& other ) { m128 = other.m128; } __forceinline sseb& operator=( const sseb& other ) { m128 = other.m128; return *this; } @@ -47,10 +47,10 @@ struct sseb __forceinline operator const __m128&( void ) const { return m128; } __forceinline operator const __m128i( void ) const { return _mm_castps_si128(m128); } __forceinline operator const __m128d( void ) const { return _mm_castps_pd(m128); } - + __forceinline sseb ( bool a ) : m128(_mm_lookupmask_ps[(size_t(a) << 3) | (size_t(a) << 2) | (size_t(a) << 1) | size_t(a)]) {} - __forceinline sseb ( bool a, bool b) + __forceinline sseb ( bool a, bool b) : m128(_mm_lookupmask_ps[(size_t(b) << 3) | (size_t(a) << 2) | (size_t(b) << 1) | size_t(a)]) {} __forceinline sseb ( bool a, bool b, bool c, bool d) : m128(_mm_lookupmask_ps[(size_t(d) << 3) | (size_t(c) << 2) | (size_t(b) << 1) | size_t(a)]) {} @@ -103,11 +103,11 @@ __forceinline const sseb operator ^=( sseb& a, const sseb& b ) { return a = a ^ __forceinline const sseb operator !=( const sseb& a, const sseb& b ) { return _mm_xor_ps(a, b); } __forceinline const sseb operator ==( const sseb& a, const sseb& b ) { return _mm_castsi128_ps(_mm_cmpeq_epi32(a, b)); } -__forceinline const sseb select( const sseb& m, const sseb& t, const sseb& f ) { +__forceinline const sseb select( const sseb& m, const sseb& t, const sseb& f ) { #if defined(__KERNEL_SSE41__) - return _mm_blendv_ps(f, t, m); + return _mm_blendv_ps(f, t, m); #else - return _mm_or_ps(_mm_and_ps(m, t), _mm_andnot_ps(m, f)); + return _mm_or_ps(_mm_and_ps(m, t), _mm_andnot_ps(m, f)); #endif } @@ -186,4 +186,3 @@ ccl_device_inline void print_sseb(const char *label, const sseb &a) CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_ssef.h b/intern/cycles/util/util_ssef.h index e9a617bb2cc..b5623860e33 100644 --- a/intern/cycles/util/util_ssef.h +++ b/intern/cycles/util/util_ssef.h @@ -31,14 +31,14 @@ struct ssef typedef sseb Mask; // mask type typedef ssei Int; // int type typedef ssef Float; // float type - + enum { size = 4 }; // number of SIMD elements union { __m128 m128; float f[4]; int i[4]; }; // data //////////////////////////////////////////////////////////////////////////////// /// Constructors, Assignment & Cast Operators //////////////////////////////////////////////////////////////////////////////// - + __forceinline ssef () {} __forceinline ssef (const ssef& other) { m128 = other.m128; } __forceinline ssef& operator=(const ssef& other) { m128 = other.m128; return *this; } @@ -143,7 +143,7 @@ __forceinline ssef mini(const ssef& a, const ssef& b) { return _mm_castsi128_ps(ci); } #endif - + #if defined(__KERNEL_SSE41__) __forceinline ssef maxi(const ssef& a, const ssef& b) { const ssei ai = _mm_castps_si128(a); @@ -229,7 +229,7 @@ __forceinline const ssef select(const ssef& m, const ssef& t, const ssef& f) { #endif } -__forceinline const ssef select(const int mask, const ssef& t, const ssef& f) { +__forceinline const ssef select(const int mask, const ssef& t, const ssef& f) { #if defined(__KERNEL_SSE41__) && ((!defined(__clang__) && !defined(_MSC_VER)) || defined(__INTEL_COMPILER)) return _mm_blend_ps(f, t, mask); #else @@ -298,8 +298,8 @@ template<> __forceinline const ssef shuffle<2, 3, 2, 3>(const ssef& a, const sse } #if defined(__KERNEL_SSSE3__) -__forceinline const ssef shuffle8(const ssef& a, const ssei& shuf) { - return _mm_castsi128_ps(_mm_shuffle_epi8(_mm_castps_si128(a), shuf)); +__forceinline const ssef shuffle8(const ssef& a, const ssei& shuf) { + return _mm_castsi128_ps(_mm_shuffle_epi8(_mm_castps_si128(a), shuf)); } #endif @@ -333,7 +333,7 @@ template<size_t dst> __forceinline const ssef insert(const ssef& a, /// Transpose //////////////////////////////////////////////////////////////////////////////// -__forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, const ssef& r3, ssef& c0, ssef& c1, ssef& c2, ssef& c3) +__forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, const ssef& r3, ssef& c0, ssef& c1, ssef& c2, ssef& c3) { ssef l02 = unpacklo(r0,r2); ssef h02 = unpackhi(r0,r2); @@ -345,7 +345,7 @@ __forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, con c3 = unpackhi(h02,h13); } -__forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, const ssef& r3, ssef& c0, ssef& c1, ssef& c2) +__forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, const ssef& r3, ssef& c0, ssef& c1, ssef& c2) { ssef l02 = unpacklo(r0,r2); ssef h02 = unpackhi(r0,r2); @@ -382,22 +382,22 @@ __forceinline size_t movemask( const ssef& a ) { return _mm_movemask_ps(a); } __forceinline ssef load4f(const float4& a) { #ifdef __KERNEL_WITH_SSE_ALIGN__ - return _mm_load_ps(&a.x); + return _mm_load_ps(&a.x); #else - return _mm_loadu_ps(&a.x); + return _mm_loadu_ps(&a.x); #endif } __forceinline ssef load4f(const float3& a) { #ifdef __KERNEL_WITH_SSE_ALIGN__ - return _mm_load_ps(&a.x); + return _mm_load_ps(&a.x); #else - return _mm_loadu_ps(&a.x); + return _mm_loadu_ps(&a.x); #endif } __forceinline ssef load4f(const void* const a) { - return _mm_load_ps((float*)a); + return _mm_load_ps((float*)a); } __forceinline ssef load1f_first(const float a) { @@ -409,14 +409,14 @@ __forceinline void store4f(void* ptr, const ssef& v) { } __forceinline ssef loadu4f(const void* const a) { - return _mm_loadu_ps((float*)a); + return _mm_loadu_ps((float*)a); } __forceinline void storeu4f(void* ptr, const ssef& v) { _mm_storeu_ps((float*)ptr,v); } -__forceinline void store4f(const sseb& mask, void* ptr, const ssef& f) { +__forceinline void store4f(const sseb& mask, void* ptr, const ssef& f) { #if defined(__KERNEL_AVX__) _mm_maskstore_ps((float*)ptr,(__m128i)mask,f); #else @@ -428,7 +428,7 @@ __forceinline ssef load4f_nt(void* ptr) { #if defined(__KERNEL_SSE41__) return _mm_castsi128_ps(_mm_stream_load_si128((__m128i*)ptr)); #else - return _mm_load_ps((float*)ptr); + return _mm_load_ps((float*)ptr); #endif } @@ -449,7 +449,7 @@ __forceinline float dot(const ssef& a, const ssef& b) { } /* calculate shuffled cross product, useful when order of components does not matter */ -__forceinline ssef cross_zxy(const ssef& a, const ssef& b) +__forceinline ssef cross_zxy(const ssef& a, const ssef& b) { const ssef a0 = a; const ssef b0 = shuffle<1,2,0,3>(b); @@ -458,7 +458,7 @@ __forceinline ssef cross_zxy(const ssef& a, const ssef& b) return msub(a0,b0,a1*b1); } -__forceinline ssef cross(const ssef& a, const ssef& b) +__forceinline ssef cross(const ssef& a, const ssef& b) { return shuffle<1,2,0,3>(cross_zxy(a, b)); } @@ -628,4 +628,3 @@ ccl_device_inline void print_ssef(const char *label, const ssef &a) CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_ssei.h b/intern/cycles/util/util_ssei.h index ef2a9e68b7d..ba0389cd114 100644 --- a/intern/cycles/util/util_ssei.h +++ b/intern/cycles/util/util_ssei.h @@ -38,7 +38,7 @@ struct ssei //////////////////////////////////////////////////////////////////////////////// /// Constructors, Assignment & Cast Operators //////////////////////////////////////////////////////////////////////////////// - + __forceinline ssei ( ) {} __forceinline ssei ( const ssei& a ) { m128 = a.m128; } __forceinline ssei& operator=( const ssei& a ) { m128 = a.m128; return *this; } @@ -173,15 +173,15 @@ __forceinline const sseb operator <=( const ssei& a, const ssei& b ) { return !( __forceinline const sseb operator <=( const ssei& a, const int32_t& b ) { return a <= ssei(b); } __forceinline const sseb operator <=( const int32_t& a, const ssei& b ) { return ssei(a) <= b; } -__forceinline const ssei select( const sseb& m, const ssei& t, const ssei& f ) { +__forceinline const ssei select( const sseb& m, const ssei& t, const ssei& f ) { #ifdef __KERNEL_SSE41__ - return _mm_castps_si128(_mm_blendv_ps(_mm_castsi128_ps(f), _mm_castsi128_ps(t), m)); + return _mm_castps_si128(_mm_blendv_ps(_mm_castsi128_ps(f), _mm_castsi128_ps(t), m)); #else - return _mm_or_si128(_mm_and_si128(m, t), _mm_andnot_si128(m, f)); + return _mm_or_si128(_mm_and_si128(m, t), _mm_andnot_si128(m, f)); #endif } -__forceinline const ssei select( const int mask, const ssei& t, const ssei& f ) { +__forceinline const ssei select( const int mask, const ssei& t, const ssei& f ) { #if defined(__KERNEL_SSE41__) && ((!defined(__clang__) && !defined(_MSC_VER)) || defined(__INTEL_COMPILER)) return _mm_castps_si128(_mm_blend_ps(_mm_castsi128_ps(f), _mm_castsi128_ps(t), mask)); #else @@ -249,8 +249,8 @@ __forceinline int reduce_add(const ssei& v) { return v[0]+v[1]+v[2]+v[3]; } /// Memory load and store operations //////////////////////////////////////////////////////////////////////////////// -__forceinline ssei load4i( const void* const a ) { - return _mm_load_si128((__m128i*)a); +__forceinline ssei load4i( const void* const a ) { + return _mm_load_si128((__m128i*)a); } __forceinline void store4i(void* ptr, const ssei& v) { @@ -261,7 +261,7 @@ __forceinline void storeu4i(void* ptr, const ssei& v) { _mm_storeu_si128((__m128i*)ptr,v); } -__forceinline void store4i( const sseb& mask, void* ptr, const ssei& i ) { +__forceinline void store4i( const sseb& mask, void* ptr, const ssei& i ) { #if defined (__KERNEL_AVX__) _mm_maskstore_ps((float*)ptr,(__m128i)mask,_mm_castsi128_ps(i)); #else @@ -269,17 +269,17 @@ __forceinline void store4i( const sseb& mask, void* ptr, const ssei& i ) { #endif } -__forceinline ssei load4i_nt (void* ptr) { +__forceinline ssei load4i_nt (void* ptr) { #if defined(__KERNEL_SSE41__) - return _mm_stream_load_si128((__m128i*)ptr); + return _mm_stream_load_si128((__m128i*)ptr); #else - return _mm_load_si128((__m128i*)ptr); + return _mm_load_si128((__m128i*)ptr); #endif } -__forceinline void store4i_nt(void* ptr, const ssei& v) { +__forceinline void store4i_nt(void* ptr, const ssei& v) { #if defined(__KERNEL_SSE41__) - _mm_stream_ps((float*)ptr,_mm_castsi128_ps(v)); + _mm_stream_ps((float*)ptr,_mm_castsi128_ps(v)); #else _mm_store_si128((__m128i*)ptr,v); #endif @@ -300,4 +300,3 @@ ccl_device_inline void print_ssei(const char *label, const ssei &a) CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp index 94ad512982c..995f5d3df27 100644 --- a/intern/cycles/util/util_string.cpp +++ b/intern/cycles/util/util_string.cpp @@ -293,4 +293,3 @@ string string_human_readable_number(size_t num) } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_string.h b/intern/cycles/util/util_string.h index e2c105db9c1..7dfa97335a9 100644 --- a/intern/cycles/util/util_string.h +++ b/intern/cycles/util/util_string.h @@ -73,4 +73,3 @@ string string_human_readable_number(size_t num); CCL_NAMESPACE_END #endif /* __UTIL_STRING_H__ */ - diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp index 5f5211228c5..8ae5b63b2f9 100644 --- a/intern/cycles/util/util_system.cpp +++ b/intern/cycles/util/util_system.cpp @@ -312,4 +312,3 @@ size_t system_physical_ram() } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_system.h b/intern/cycles/util/util_system.h index e55dd6dd136..42ad72356b9 100644 --- a/intern/cycles/util/util_system.h +++ b/intern/cycles/util/util_system.h @@ -47,4 +47,3 @@ size_t system_physical_ram(); CCL_NAMESPACE_END #endif /* __UTIL_SYSTEM_H__ */ - diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp index 9df1096de8a..2d21d6b5a18 100644 --- a/intern/cycles/util/util_task.cpp +++ b/intern/cycles/util/util_task.cpp @@ -122,7 +122,7 @@ void TaskPool::cancel() do_cancel = true; TaskScheduler::clear(this); - + { thread_scoped_lock num_lock(num_mutex); @@ -210,7 +210,7 @@ void TaskScheduler::init(int num_threads) int current_group_threads = 0; if(num_groups > 1) { process_groups.resize(num_groups); - num_process_groups = system_cpu_process_groups(num_groups, + num_process_groups = system_cpu_process_groups(num_groups, &process_groups[0]); if(num_process_groups == 1) { current_group_threads = system_cpu_group_thread_count(process_groups[0]); @@ -251,7 +251,7 @@ void TaskScheduler::init(int num_threads) } } } - + users++; } @@ -295,7 +295,7 @@ bool TaskScheduler::thread_wait_pop(Entry& entry) assert(do_exit); return false; } - + entry = queue.front(); queue.pop_front(); @@ -518,4 +518,3 @@ string TaskPool::Summary::full_report() const } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h index 3ebfb007e40..15f0d341be7 100644 --- a/intern/cycles/util/util_task.h +++ b/intern/cycles/util/util_task.h @@ -118,7 +118,7 @@ protected: }; /* Task Scheduler - * + * * Central scheduler that holds running threads ready to execute tasks. A singe * queue holds the task from all pools. */ @@ -207,4 +207,3 @@ protected: CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_thread.h b/intern/cycles/util/util_thread.h index 4d8f464359c..77b51d37ea0 100644 --- a/intern/cycles/util/util_thread.h +++ b/intern/cycles/util/util_thread.h @@ -155,4 +155,3 @@ protected: CCL_NAMESPACE_END #endif /* __UTIL_THREAD_H__ */ - diff --git a/intern/cycles/util/util_time.cpp b/intern/cycles/util/util_time.cpp index 7c39aa294bf..bc6ac4e2099 100644 --- a/intern/cycles/util/util_time.cpp +++ b/intern/cycles/util/util_time.cpp @@ -77,4 +77,3 @@ void time_sleep(double t) CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_time.h b/intern/cycles/util/util_time.h index f03aa590e9b..13281bf188b 100644 --- a/intern/cycles/util/util_time.h +++ b/intern/cycles/util/util_time.h @@ -59,4 +59,3 @@ protected: CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_transform.cpp b/intern/cycles/util/util_transform.cpp index 206c3da23eb..c72e729a2e5 100644 --- a/intern/cycles/util/util_transform.cpp +++ b/intern/cycles/util/util_transform.cpp @@ -16,10 +16,10 @@ /* * Adapted from code with license: - * + * * Copyright (c) 2002, Industrial Light & Magic, a division of Lucas * Digital Ltd. LLC. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -31,8 +31,8 @@ * distribution. * * Neither the name of Industrial Light & Magic nor the names of its * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * + * from this software without specific prior written permission. + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -236,7 +236,7 @@ static void transform_decompose(DecomposedTransform *decomp, const Transform *tf for(int i = 0; i < 3; i++) for(int j = 0; j < 4; j++) Rnext[i][j] = 0.5f * (R[i][j] + Rit[i][j]); - + norm = 0.0f; for(int i = 0; i < 3; i++) { norm = max(norm, diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h index 987f4dac777..e781f85dded 100644 --- a/intern/cycles/util/util_transform.h +++ b/intern/cycles/util/util_transform.h @@ -258,7 +258,7 @@ ccl_device_inline bool transform_uniform_scale(const Transform& tfm, float& scal /* the epsilon here is quite arbitrary, but this function is only used for * surface area and bump, where we expect it to not be so sensitive */ float eps = 1e-6f; - + float sx = len_squared(float4_to_float3(tfm.x)); float sy = len_squared(float4_to_float3(tfm.y)); float sz = len_squared(float4_to_float3(tfm.z)); @@ -471,4 +471,3 @@ OPENCL_TRANSFORM_ADDRSPACE_DECLARE(transform_direction_transposed) CCL_NAMESPACE_END #endif /* __UTIL_TRANSFORM_H__ */ - diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h index 4bbba649ff2..dfe755a8789 100644 --- a/intern/cycles/util/util_types.h +++ b/intern/cycles/util/util_types.h @@ -152,4 +152,3 @@ CCL_NAMESPACE_END #endif #endif /* __UTIL_TYPES_H__ */ - diff --git a/intern/cycles/util/util_types_float4_impl.h b/intern/cycles/util/util_types_float4_impl.h index 09f45f47d38..a49fac65b10 100644 --- a/intern/cycles/util/util_types_float4_impl.h +++ b/intern/cycles/util/util_types_float4_impl.h @@ -102,7 +102,7 @@ ccl_device_inline float4 make_float4(const int4& i) ccl_device_inline void print_float4(const char *label, const float4& a) { printf("%s: %.8f %.8f %.8f %.8f\n", - label, + label, (double)a.x, (double)a.y, (double)a.z, (double)a.w); } #endif /* __KERNEL_GPU__ */ diff --git a/intern/cycles/util/util_vector.h b/intern/cycles/util/util_vector.h index 8d91d3936a4..569f503b66e 100644 --- a/intern/cycles/util/util_vector.h +++ b/intern/cycles/util/util_vector.h @@ -341,4 +341,3 @@ protected: CCL_NAMESPACE_END #endif /* __UTIL_VECTOR_H__ */ - diff --git a/intern/cycles/util/util_view.cpp b/intern/cycles/util/util_view.cpp index 10d86167921..3836cc86ee0 100644 --- a/intern/cycles/util/util_view.cpp +++ b/intern/cycles/util/util_view.cpp @@ -272,4 +272,3 @@ void view_redraw() } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_view.h b/intern/cycles/util/util_view.h index 5def0564175..e603e605776 100644 --- a/intern/cycles/util/util_view.h +++ b/intern/cycles/util/util_view.h @@ -41,4 +41,3 @@ void view_redraw(); CCL_NAMESPACE_END #endif /*__UTIL_VIEW_H__*/ - diff --git a/intern/cycles/util/util_windows.h b/intern/cycles/util/util_windows.h index 7ea3e65c2c5..3b23ce8a3cb 100644 --- a/intern/cycles/util/util_windows.h +++ b/intern/cycles/util/util_windows.h @@ -57,4 +57,3 @@ CCL_NAMESPACE_END #endif /* WIN32 */ #endif /* __UTIL_WINDOWS_H__ */ - |