1 /*
2  * Copyright 2011-2017 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /* Optimized CPU kernel entry points. This file is compiled with SSE3/SSSE3
18  * optimization flags and nearly all functions inlined, while kernel.cpp
19  * is compiled without for other CPU's. */
20 
21 #include "util/util_optimization.h"
22 
23 #ifndef WITH_CYCLES_OPTIMIZED_KERNEL_SSE41
24 #  define KERNEL_STUB
25 #else
26 /* SSE optimization disabled for now on 32 bit, see bug T36316. */
27 #  if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
28 #    define __KERNEL_SSE__
29 #    define __KERNEL_SSE2__
30 #    define __KERNEL_SSE3__
31 #    define __KERNEL_SSSE3__
32 #    define __KERNEL_SSE41__
33 #  endif
34 #endif /* WITH_CYCLES_OPTIMIZED_KERNEL_SSE41 */
35 
36 #include "kernel/filter/filter.h"
37 #define KERNEL_ARCH cpu_sse41
38 #include "kernel/kernels/cpu/filter_cpu_impl.h"
39