aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkOpts_hsw.cpp
blob: bb4e4d1f478285f075a90fbf8ece0a94ff2a9beb (plain)
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
/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "SkSafe_math.h"   // Keep this first.

// Please note carefully.
// It is not safe for _opts.h files included here to use STL types, for the
// same reason we just had to include SkSafe_math.h: STL types are templated,
// defined in headers, but not in anonymous namespaces.  It's very easy to
// cause ODR violations with these types and AVX+ code generation.

#include "SkOpts.h"
#define SK_OPTS_NS hsw
#include "SkBitmapFilter_opts.h"
#include "SkRasterPipeline_opts.h"

#if defined(_INC_MATH) && !defined(INC_MATH_IS_SAFE_NOW)
    #error We have included ucrt\math.h without protecting it against ODR violation.
#endif

namespace SkOpts {
    void Init_hsw() {
        run_pipeline     = hsw::run_pipeline;
        compile_pipeline = hsw::compile_pipeline;
        convolve_vertically = hsw::convolve_vertically;
    }
}