cce3767ba8
Split it out as a C file, to avoid accidental C++ header inclusion, and C is a cross-platform assembler anyway so a good match. Change-Id: I6c042781713aecaf143b9663af8377659a7deaf1 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
29 lines
493 B
C++
29 lines
493 B
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
|
/*
|
|
* Copyright the Collabora Online contributors.
|
|
*
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
#include <config.h>
|
|
#include <Simd.hpp>
|
|
|
|
#if ENABLE_SIMD
|
|
# include <immintrin.h>
|
|
#endif
|
|
|
|
namespace simd {
|
|
|
|
bool HasAVX2 = false;
|
|
|
|
void init()
|
|
{
|
|
#if ENABLE_SIMD
|
|
__builtin_cpu_init();
|
|
HasAVX2 = __builtin_cpu_supports ("avx2");
|
|
#endif
|
|
}
|
|
|
|
};
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|