• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2018 Google LLC
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #include "skcms_public.h"     // NO_G3_REWRITE
9 #include "skcms_internals.h"  // NO_G3_REWRITE
10 #include "skcms_Transform.h"  // NO_G3_REWRITE
11 #include <assert.h>
12 #include <float.h>
13 #include <limits.h>
14 #include <stdlib.h>
15 #include <string.h>
16 
17 #if defined(__ARM_NEON)
18     #include <arm_neon.h>
19 #elif defined(__SSE__)
20     #include <immintrin.h>
21 
22     #if defined(__clang__)
23         // That #include <immintrin.h> is usually enough, but Clang's headers
24         // avoid #including the whole kitchen sink when _MSC_VER is defined,
25         // because lots of programs on Windows would include that and it'd be
26         // a lot slower. But we want all those headers included, so we can use
27         // their features (after making runtime checks).
28         #include <smmintrin.h>
29     #endif
30 #endif
31 
32 namespace skcms_private {
33 namespace baseline {
34 
35 #if defined(SKCMS_PORTABLE)
36     // Build skcms in a portable scalar configuration.
37     #define N 1
38     template <typename T> using V = T;
39 #else
40     // Build skcms with basic four-line SIMD support. (SSE on Intel, or Neon on ARM)
41     #define N 4
42     template <typename T> using V = skcms_private::Vec<N,T>;
43 #endif
44 
45 #include "Transform_inl.h"
46 
47 }  // namespace baseline
48 }  // namespace skcms_private
49