/*************************************************************************** * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and * * Martin Renou * * Copyright (c) QuantStack * * Copyright (c) Serge Guelton * * * * Distributed under the terms of the BSD 3-Clause License. * * * * The full license is in the file LICENSE, distributed with this software. * ****************************************************************************/ #ifndef XSIMD_FMA3_AVX_HPP #define XSIMD_FMA3_AVX_HPP #include "../types/xsimd_fma3_avx_register.hpp" namespace xsimd { namespace kernel { using namespace types; // fnma template inline batch fnma(batch const& x, batch const& y, batch const& z, requires_arch>) noexcept { return _mm256_fnmadd_ps(x, y, z); } template inline batch fnma(batch const& x, batch const& y, batch const& z, requires_arch>) noexcept { return _mm256_fnmadd_pd(x, y, z); } // fnms template inline batch fnms(batch const& x, batch const& y, batch const& z, requires_arch>) noexcept { return _mm256_fnmsub_ps(x, y, z); } template inline batch fnms(batch const& x, batch const& y, batch const& z, requires_arch>) noexcept { return _mm256_fnmsub_pd(x, y, z); } // fma template inline batch fma(batch const& x, batch const& y, batch const& z, requires_arch>) noexcept { return _mm256_fmadd_ps(x, y, z); } template inline batch fma(batch const& x, batch const& y, batch const& z, requires_arch>) noexcept { return _mm256_fmadd_pd(x, y, z); } // fms template inline batch fms(batch const& x, batch const& y, batch const& z, requires_arch>) noexcept { return _mm256_fmsub_ps(x, y, z); } template inline batch fms(batch const& x, batch const& y, batch const& z, requires_arch>) noexcept { return _mm256_fmsub_pd(x, y, z); } } } #endif