File: skcms_TransformBaseline.cc

package info (click to toggle)
webkit2gtk 2.51.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 455,340 kB
  • sloc: cpp: 3,865,253; javascript: 197,710; ansic: 165,177; python: 49,241; asm: 21,868; ruby: 18,095; perl: 16,926; xml: 4,623; sh: 2,409; yacc: 2,356; java: 2,019; lex: 1,330; pascal: 372; makefile: 210
file content (50 lines) | stat: -rw-r--r-- 1,434 bytes parent folder | download | duplicates (36)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "skcms_public.h"     // NO_G3_REWRITE
#include "skcms_internals.h"  // NO_G3_REWRITE
#include "skcms_Transform.h"  // NO_G3_REWRITE
#include <assert.h>
#include <float.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>

#if defined(__ARM_NEON)
    #include <arm_neon.h>
#elif defined(__SSE__)
    #include <immintrin.h>

    #if defined(__clang__)
        // That #include <immintrin.h> is usually enough, but Clang's headers
        // avoid #including the whole kitchen sink when _MSC_VER is defined,
        // because lots of programs on Windows would include that and it'd be
        // a lot slower. But we want all those headers included, so we can use
        // their features (after making runtime checks).
        #include <smmintrin.h>
    #endif
#elif defined(__loongarch_sx)
    #include <lsxintrin.h>
#endif

namespace skcms_private {
namespace baseline {

#if defined(SKCMS_PORTABLE)
    // Build skcms in a portable scalar configuration.
    #define N 1
    template <typename T> using V = T;
#else
    // Build skcms with basic four-line SIMD support. (SSE on Intel, or Neon on ARM)
    #define N 4
    template <typename T> using V = skcms_private::Vec<N,T>;
#endif

#include "Transform_inl.h"

}  // namespace baseline
}  // namespace skcms_private