[Bf-blender-cvs] [d59d03818e6] temp-cycles-denoising: Cycles Denoising: Remove unused filter_compat headers

Lukas Stockner noreply at git.blender.org
Wed Apr 19 20:46:55 CEST 2017


Commit: d59d03818e6ab8b3b61d34013fe12fa7024ec065
Author: Lukas Stockner
Date:   Wed Apr 19 20:16:44 2017 +0200
Branches: temp-cycles-denoising
https://developer.blender.org/rBd59d03818e6ab8b3b61d34013fe12fa7024ec065

Cycles Denoising: Remove unused filter_compat headers

===================================================================

M	intern/cycles/kernel/CMakeLists.txt
D	intern/cycles/kernel/filter/filter_compat_cpu.h
D	intern/cycles/kernel/filter/filter_compat_cuda.h
D	intern/cycles/kernel/filter/filter_compat_opencl.h

===================================================================

diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index 84fd3b84a69..63a6085e2c9 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -208,9 +208,6 @@ set(SRC_GEOM_HEADERS
 
 set(SRC_FILTER_HEADERS
 	filter/filter.h
-	filter/filter_compat_cpu.h
-	filter/filter_compat_cuda.h
-	filter/filter_compat_opencl.h
 	filter/filter_defines.h
 	filter/filter_features.h
 	filter/filter_features_sse.h
diff --git a/intern/cycles/kernel/filter/filter_compat_cpu.h b/intern/cycles/kernel/filter/filter_compat_cpu.h
deleted file mode 100644
index d37b956b28c..00000000000
--- a/intern/cycles/kernel/filter/filter_compat_cpu.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2011-2017 Blender Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __FILTER_COMPAT_CPU_H__
-#define __FILTER_COMPAT_CPU_H__
-
-#define __KERNEL_CPU__
-
-/* Release kernel has too much false-positive maybe-uninitialized warnings,
- * which makes it possible to miss actual warnings.
- */
-#if (defined(__GNUC__) && !defined(__clang__)) && defined(NDEBUG)
-#  pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-#  pragma GCC diagnostic ignored "-Wuninitialized"
-#endif
-
-#include "util/util_debug.h"
-#include "util/util_math.h"
-#include "util/util_simd.h"
-#include "util/util_system.h"
-#include "util/util_half.h"
-#include "util/util_types.h"
-
-#define ccl_addr_space
-
-#define ccl_readonly_ptr const * __restrict
-
-/* On x86_64, versions of glibc < 2.16 have an issue where expf is
- * much slower than the double version.  This was fixed in glibc 2.16.
- */
-#if !defined(__KERNEL_GPU__)  && defined(__x86_64__) && defined(__x86_64__) && \
-     defined(__GNU_LIBRARY__) && defined(__GLIBC__ ) && defined(__GLIBC_MINOR__) && \
-     (__GLIBC__ <= 2 && __GLIBC_MINOR__ < 16)
-#  define expf(x) ((float)exp((double)(x)))
-#endif
-
-CCL_NAMESPACE_BEGIN
-
-/* Assertions inside the kernel only work for the CPU device, so we wrap it in
- * a macro which is empty for other devices */
-
-#define kernel_assert(cond) assert(cond)
-
-#if 0
-#ifdef __KERNEL_SSE2__
-typedef vector3<sseb> sse3b;
-typedef vector3<ssef> sse3f;
-typedef vector3<ssei> sse3i;
-
-ccl_device_inline void print_sse3b(const char *label, sse3b& a)
-{
-	print_sseb(label, a.x);
-	print_sseb(label, a.y);
-	print_sseb(label, a.z);
-}
-
-ccl_device_inline void print_sse3f(const char *label, sse3f& a)
-{
-	print_ssef(label, a.x);
-	print_ssef(label, a.y);
-	print_ssef(label, a.z);
-}
-
-ccl_device_inline void print_sse3i(const char *label, sse3i& a)
-{
-	print_ssei(label, a.x);
-	print_ssei(label, a.y);
-	print_ssei(label, a.z);
-}
-
-#endif
-#endif
-
-CCL_NAMESPACE_END
-
-#endif /* __FILTER_COMPAT_CPU_H__ */
-
diff --git a/intern/cycles/kernel/filter/filter_compat_cuda.h b/intern/cycles/kernel/filter/filter_compat_cuda.h
deleted file mode 100644
index 59712cef37a..00000000000
--- a/intern/cycles/kernel/filter/filter_compat_cuda.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2011-2017 Blender Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __FILTER_COMPAT_CUDA_H__
-#define __FILTER_COMPAT_CUDA_H__
-
-#define __KERNEL_GPU__
-#define __KERNEL_CUDA__
-#define CCL_NAMESPACE_BEGIN
-#define CCL_NAMESPACE_END
-
-#include <cuda.h>
-#include <cuda_fp16.h>
-#include <float.h>
-
-/* Qualifier wrappers for different names on different devices */
-
-#define ccl_device  __device__ __inline__
-#  define ccl_device_forceinline  __device__ __forceinline__
-#if (__KERNEL_CUDA_VERSION__ == 80) && (__CUDA_ARCH__ < 500)
-#  define ccl_device_inline  __device__ __forceinline__
-#else
-#  define ccl_device_inline  __device__ __inline__
-#endif
-#define ccl_device_noinline  __device__ __noinline__
-#define ccl_global
-#define ccl_constant
-#define ccl_may_alias
-#define ccl_addr_space
-#define ccl_restrict __restrict__
-#define ccl_align(n) __align__(n)
-#define ccl_readonly_ptr const * __restrict__
-#define ccl_local __shared__
-#define ccl_local_param
-
-#define CCL_MAX_LOCAL_SIZE (CUDA_THREADS_BLOCK_WIDTH*CUDA_THREADS_BLOCK_WIDTH)
-
-/* No assert supported for CUDA */
-
-#define kernel_assert(cond)
-
-/* Types */
-
-#include "util/util_half.h"
-#include "util/util_types.h"
-
-/* Use fast math functions */
-
-#define cosf(x) __cosf(((float)(x)))
-#define sinf(x) __sinf(((float)(x)))
-#define powf(x, y) __powf(((float)(x)), ((float)(y)))
-#define tanf(x) __tanf(((float)(x)))
-#define logf(x) __logf(((float)(x)))
-#define expf(x) __expf(((float)(x)))
-
-#endif /* __FILTER_COMPAT_CUDA_H__ */
diff --git a/intern/cycles/kernel/filter/filter_compat_opencl.h b/intern/cycles/kernel/filter/filter_compat_opencl.h
deleted file mode 100644
index 031821e2277..00000000000
--- a/intern/cycles/kernel/filter/filter_compat_opencl.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2011-2017 Blender Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __FILTER_COMPAT_OPENCL_H__
-#define __FILTER_COMPAT_OPENCL_H__
-
-#define __KERNEL_GPU__
-#define __KERNEL_OPENCL__
-
-/* no namespaces in opencl */
-#define CCL_NAMESPACE_BEGIN
-#define CCL_NAMESPACE_END
-
-#ifdef __CL_NOINLINE__
-#  define ccl_noinline __attribute__((noinline))
-#else
-#  define ccl_noinline
-#endif
-
-/* in opencl all functions are device functions, so leave this empty */
-#define ccl_device
-#define ccl_device_inline ccl_device
-#define ccl_device_forceinline ccl_device
-#define ccl_device_noinline ccl_device ccl_noinline
-#define ccl_may_alias
-#define ccl_constant __constant
-#define ccl_global __global
-#define ccl_local __local
-#define ccl_private __private
-#define ccl_restrict restrict
-#define ccl_align(n) __attribute__((aligned(n)))
-#define ccl_readonly_ptr const * __restrict__
-#define ccl_local __local
-#define ccl_local_param __local
-
-#define CCL_MAX_LOCAL_SIZE 256
-
-/* no assert in opencl */
-#define kernel_assert(cond)
-
-/* make_type definitions with opencl style element initializers */
-#ifdef make_float2
-#  undef make_float2
-#endif
-#ifdef make_float3
-#  undef make_float3
-#endif
-#ifdef make_float4
-#  undef make_float4
-#endif
-#ifdef make_int2
-#  undef make_int2
-#endif
-#ifdef make_int3
-#  undef make_int3
-#endif
-#ifdef make_int4
-#  undef make_int4
-#endif
-#ifdef make_uchar4
-#  undef make_uchar4
-#endif
-
-#define make_float2(x, y) ((float2)(x, y))
-#define make_float3(x, y, z) ((float3)(x, y, z))
-#define make_float4(x, y, z, w) ((float4)(x, y, z, w))
-#define make_int2(x, y) ((int2)(x, y))
-#define make_int3(x, y, z) ((int3)(x, y, z))
-#define make_int4(x, y, z, w) ((int4)(x, y, z, w))
-#define make_uchar4(x, y, z, w) ((uchar4)(x, y, z, w))
-
-/* math functions */
-#define __uint_as_float(x) as_float(x)
-#define __float_as_uint(x) as_uint(x)
-#define __int_as_float(x) as_float(x)
-#define __float_as_int(x) as_int(x)
-#define powf(x, y) pow(((float)(x)), ((float)(y)))
-#define fabsf(x) fabs(((float)(x)))
-#define copysignf(x, y) copysign(((float)(x)), ((float)(y)))
-#define asinf(x) asin(((float)(x)))
-#define acosf(x) acos(((float)(x)))
-#define atanf(x) atan(((float)(x)))
-#define floorf(x) floor(((float)(x)))
-#define ceilf(x) ceil(((float)(x)))
-#define hypotf(x, y) hypot(((float)(x)), ((float)(y)))
-#define atan2f(x, y) atan2(((float)(x)), ((float)(y)))
-#define fmaxf(x, y) fmax(((float)(x)), ((float)(y)))
-#define fminf(x, y) fmin(((float)(x)), ((float)(y)))
-#define fmodf(x, y) fmod((float)(x), (float)(y))
-
-#ifndef __CL_USE_NATIVE__
-#  define sinf(x) native_sin(((float)(x)))
-#  define cosf(x) native_cos(((float)(x)))
-#  define tanf(x) native_tan(((float)(x)))
-#  define expf(x) native_exp(((float)(x)))
-#  define sqrtf(x) native_sqrt(((float)(x)))
-#  define logf(x) native_log(((float)(x)))
-#else
-#  define sinf(x) sin(((float)(x)))
-#  define cosf(x) cos(((float)(x)))
-#  define tanf(x) tan(((float)(x)))
-#  define expf(x) exp(((float)(x)))
-#  define sqrtf(x) sqrt(((float)(x)))
-#  define logf(x) log(((float)(x)))
-#endif
-
-/* define NULL */
-#define NULL 0
-
-#include "util/util_half.h"
-#include "util/util_types.h"
-
-#endif /* __FILTER_COMPAT_OPENCL_H__ */
-




More information about the Bf-blender-cvs mailing list