// Matrix Construct // // Copyright (C) Matrix Construct Developers, Authors & Contributors // Copyright (C) 2016-2021 Jason Volk // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. #pragma once #define HAVE_IRCD_MATH_EXP_H namespace ircd::math { template typename std::enable_if(), T>::type exp(T); template typename std::enable_if(), T>::type expf(T); template typename std::enable_if(), T>::type expl(T); } namespace ircd { using ::exp; using ::expf; using ::expl; using math::exp; using math::expf; using math::expl; } template inline typename std::enable_if(), T>::type ircd::math::expl(T a) { for(uint i(0); i < simd::lanes(); ++i) a[i] = ::expl(a[i]); return a; } template inline typename std::enable_if(), T>::type ircd::math::expf(T a) { for(uint i(0); i < simd::lanes(); ++i) a[i] = ::expf(a[i]); return a; } template inline typename std::enable_if(), T>::type ircd::math::exp(T a) { for(uint i(0); i < simd::lanes(); ++i) a[i] = std::exp(a[i]); return a; }