Blender V4.3
kernel_avx2.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5/* Optimized CPU kernel entry points. This file is compiled with AVX2
6 * optimization flags and nearly all functions inlined, while kernel.cpp
7 * is compiled without for other CPU's. */
8
9#include "util/optimization.h"
10
11#ifndef WITH_CYCLES_OPTIMIZED_KERNEL_AVX2
12# define KERNEL_STUB
13#else
14/* SSE optimization disabled for now on 32 bit, see bug #36316. */
15# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
16# define __KERNEL_SSE__
17# define __KERNEL_SSE2__
18# define __KERNEL_SSE3__
19# define __KERNEL_SSSE3__
20# define __KERNEL_SSE42__
21# define __KERNEL_AVX__
22# define __KERNEL_AVX2__
23# endif
24#endif /* WITH_CYCLES_OPTIMIZED_KERNEL_AVX2 */
25
27#define KERNEL_ARCH cpu_avx2