Blender  V2.93
util_simd.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2013 Intel Corporation
3  * Modifications Copyright 2014, Blender Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #if (defined(WITH_KERNEL_SSE2)) || (defined(WITH_KERNEL_NATIVE) && defined(__SSE2__))
19 
20 # define __KERNEL_SSE2__
21 # include "util/util_simd.h"
22 
24 
25 const __m128 _mm_lookupmask_ps[16] = {_mm_castsi128_ps(_mm_set_epi32(0, 0, 0, 0)),
26  _mm_castsi128_ps(_mm_set_epi32(0, 0, 0, -1)),
27  _mm_castsi128_ps(_mm_set_epi32(0, 0, -1, 0)),
28  _mm_castsi128_ps(_mm_set_epi32(0, 0, -1, -1)),
29  _mm_castsi128_ps(_mm_set_epi32(0, -1, 0, 0)),
30  _mm_castsi128_ps(_mm_set_epi32(0, -1, 0, -1)),
31  _mm_castsi128_ps(_mm_set_epi32(0, -1, -1, 0)),
32  _mm_castsi128_ps(_mm_set_epi32(0, -1, -1, -1)),
33  _mm_castsi128_ps(_mm_set_epi32(-1, 0, 0, 0)),
34  _mm_castsi128_ps(_mm_set_epi32(-1, 0, 0, -1)),
35  _mm_castsi128_ps(_mm_set_epi32(-1, 0, -1, 0)),
36  _mm_castsi128_ps(_mm_set_epi32(-1, 0, -1, -1)),
37  _mm_castsi128_ps(_mm_set_epi32(-1, -1, 0, 0)),
38  _mm_castsi128_ps(_mm_set_epi32(-1, -1, 0, -1)),
39  _mm_castsi128_ps(_mm_set_epi32(-1, -1, -1, 0)),
40  _mm_castsi128_ps(_mm_set_epi32(-1, -1, -1, -1))};
41 
43 
44 #endif // WITH_KERNEL_SSE2
#define CCL_NAMESPACE_END