VCTR
Loading...
Searching...
No Matches
IntelIPP.h
1/*
2 ==============================================================================
3 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
5 Copyright 2022- by sonible GmbH.
6
7 This file is part of VCTR - Versatile Container Templates Reconceptualized.
8
9 VCTR is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License version 3
11 only, as published by the Free Software Foundation.
12
13 VCTR is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Lesser General Public License version 3 for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 version 3 along with VCTR. If not, see <https://www.gnu.org/licenses/>.
20 ==============================================================================
21*/
22
23namespace vctr::PlatformVectorOps
24{
25
26// clang-format off
27
28template <class T>
29class IntelIPP
30{
31};
32
33#if VCTR_USE_IPP
34
35
36template <IppStatus... allowedStatus>
37void assertAllowedStatus ([[maybe_unused]] IppStatus s)
38{
39 VCTR_ASSERT ((s == allowedStatus) || ...);
40}
41
42inline void assertIppNoErr ([[maybe_unused]] IppStatus s)
43{
44 assertAllowedStatus<ippStsNoErr> (s);
45}
46
47template <>
48class IntelIPP<float>
49{
50public:
51 static void abs (const float* src, float* dst, int len) { assertIppNoErr (ippsAbs_32f (src, dst, len)); }
52 static void add (const float* srcA, const float* srcB, float* dst, int len) { assertIppNoErr (ippsAdd_32f (srcA, srcB, dst, len)); }
53 static void add (const float* srcA, float srcB, float* dst, int len) { assertIppNoErr (ippsAddC_32f (srcA, srcB, dst, len)); }
54 static void sub (const float* srcA, const float* srcB, float* dst, int len) { assertIppNoErr (ippsSub_32f (srcB, srcA, dst, len)); }
55 static void sub (const float* srcA, float srcB, float* dst, int len) { assertIppNoErr (ippsSubC_32f (srcA, srcB, dst, len)); }
56 static void sub (float srcA, const float* srcB, float* dst, int len) { assertIppNoErr (ippsSubCRev_32f (srcB, srcA, dst, len)); }
57 static void mul (const float* srcA, const float* srcB, float* dst, int len) { assertIppNoErr (ippsMul_32f (srcA, srcB, dst, len)); }
58 static void mul (const float* srcA, float srcB, float* dst, int len) { assertIppNoErr (ippsMulC_32f (srcA, srcB, dst, len)); }
59 static void mul (float srcA, float* srcDst, int len) { assertIppNoErr (ippsMulC_32f_I (srcA, srcDst, len)); }
60 static void div (const float* srcA, const float* srcB, float* dst, int len) { assertIppNoErr (ippsDiv_32f (srcB, srcA, dst, len)); }
61 static void div (const float* srcA, float srcB, float* dst, int len) { assertIppNoErr (ippsDivC_32f (srcA, srcB, dst, len)); }
62 static void div (float srcA, const float* srcB, float* dst, int len) { assertIppNoErr (ippsDivCRev_32f (srcB, srcA, dst, len)); }
63
64 static void multiplyAccumulate (const float* srcA, const float* srcB, float* srcDst, int len) { assertIppNoErr (ippsAddProduct_32f (srcA, srcB, srcDst, len)); }
65 static void multiplyAccumulate (const float* srcA, float srcB, float* srcDst, int len) { assertIppNoErr (ippsAddProductC_32f (srcA, srcB, srcDst, len)); }
66
67 static void clampLow (const float* src, float thresh, float* dst, int len) { assertIppNoErr (ippsThreshold_LT_32f (src, dst, len, thresh)); }
68 static void clampHigh (const float* src, float thresh, float* dst, int len) { assertIppNoErr (ippsThreshold_GT_32f (src, dst, len, thresh)); }
69
70 static void ln (const float* src, float* dst, int len) { assertAllowedStatus<ippStsNoErr, ippStsSingularity> (ippsLn_32f (src, dst, len)); }
71 static void log10 (const float* src, float* dst, int len) { assertAllowedStatus<ippStsNoErr, ippStsSingularity> (ippsLog10_32f_A24 (src, dst, len)); }
72 static void exp (const float* src, float* dst, int len) { assertIppNoErr (ippsExp_32f (src, dst, len)); }
73 static void pow (const float* base, const float* exp, float* dst, int len) { assertIppNoErr (ippsPow_32f_A24 (base, exp, dst, len)); }
74 static void pow (const float* base, float exp, float* dst, int len) { assertIppNoErr (ippsPowx_32f_A24 (base, exp, dst, len)); }
75 static void sqrt (const float* src, float* dst, int len) { assertIppNoErr (ippsSqrt_32f (src, dst, len)); }
76
77 static void sin (const float* src, float* dst, int len) { assertIppNoErr (ippsSin_32f_A24 (src, dst, len)); }
78 static void cos (const float* src, float* dst, int len) { assertIppNoErr (ippsCos_32f_A24 (src, dst, len)); }
79 static void tan (const float* src, float* dst, int len) { assertIppNoErr (ippsTan_32f_A24 (src, dst, len)); }
80 static void asin (const float* src, float* dst, int len) { assertIppNoErr (ippsAsin_32f_A24 (src, dst, len)); }
81 static void acos (const float* src, float* dst, int len) { assertIppNoErr (ippsAcos_32f_A24 (src, dst, len)); }
82 static void atan (const float* src, float* dst, int len) { assertIppNoErr (ippsAtan_32f_A24 (src, dst, len)); }
83 static void sinh (const float* src, float* dst, int len) { assertIppNoErr (ippsSinh_32f_A24 (src, dst, len)); }
84 static void cosh (const float* src, float* dst, int len) { assertIppNoErr (ippsCosh_32f_A24 (src, dst, len)); }
85 static void tanh (const float* src, float* dst, int len) { assertIppNoErr (ippsTanh_32f_A24 (src, dst, len)); }
86 static void asinh (const float* src, float* dst, int len) { assertIppNoErr (ippsAsinh_32f_A24 (src, dst, len)); }
87 static void acosh (const float* src, float* dst, int len) { assertIppNoErr (ippsAcosh_32f_A24 (src, dst, len)); }
88 static void atanh (const float* src, float* dst, int len) { assertIppNoErr (ippsAtanh_32f_A24 (src, dst, len)); }
89
90 static float max (const float* src, int len) { float r; assertIppNoErr (ippsMax_32f (src, len, &r)); return r; }
91 static float maxAbs (const float* src, int len) { float r; assertIppNoErr (ippsMaxAbs_32f (src, len, &r)); return r; }
92 static float min (const float* src, int len) { float r; assertIppNoErr (ippsMin_32f (src, len, &r)); return r; }
93 static float minAbs (const float* src, int len) { float r; assertIppNoErr (ippsMinAbs_32f (src, len, &r)); return r; }
94 static float sum (const float* src, int len) { float r; assertIppNoErr (ippsSum_32f (src, len, &r, ippAlgHintNone)); return r; }
95 static float mean (const float* src, int len) { float r; assertIppNoErr (ippsMean_32f (src, len, &r, ippAlgHintNone)); return r;}
96 static float l2Norm (const float* src, int len) { float r; assertIppNoErr (ippsNorm_L2_32f (src, len, &r)); return r; }
97};
98
99template <>
100class IntelIPP<double>
101{
102public:
103 static void abs (const double* src, double* dst, int len) { assertIppNoErr (ippsAbs_64f (src, dst, len)); }
104 static void add (const double* srcA, const double* srcB, double* dst, int len) { assertIppNoErr (ippsAdd_64f (srcA, srcB, dst, len)); }
105 static void add (const double* srcA, double srcB, double* dst, int len) { assertIppNoErr (ippsAddC_64f (srcA, srcB, dst, len)); }
106 static void sub (const double* srcA, const double* srcB, double* dst, int len) { assertIppNoErr (ippsSub_64f (srcB, srcA, dst, len)); }
107 static void sub (const double* srcA, double srcB, double* dst, int len) { assertIppNoErr (ippsSubC_64f (srcA, srcB, dst, len)); }
108 static void sub (double srcA, const double* srcB, double* dst, int len) { assertIppNoErr (ippsSubCRev_64f (srcB, srcA, dst, len)); }
109 static void mul (const double* srcA, const double* srcB, double* dst, int len) { assertIppNoErr (ippsMul_64f (srcA, srcB, dst, len)); }
110 static void mul (const double* srcA, double srcB, double* dst, int len) { assertIppNoErr (ippsMulC_64f (srcA, srcB, dst, len)); }
111 static void mul (double srcA, double* srcDst, int len) { assertIppNoErr (ippsMulC_64f_I (srcA, srcDst, len)); }
112 static void div (const double* srcA, const double* srcB, double* dst, int len) { assertIppNoErr (ippsDiv_64f (srcB, srcA, dst, len)); }
113 static void div (const double* srcA, double srcB, double* dst, int len) { assertIppNoErr (ippsDivC_64f (srcA, srcB, dst, len)); }
114
115 static void multiplyAccumulate (const double* srcA, const double* srcB, double* srcDst, int len) { assertIppNoErr (ippsAddProduct_64f (srcA, srcB, srcDst, len)); }
116 static void multiplyAccumulate (const double* srcA, double srcB, double* srcDst, int len) { assertIppNoErr (ippsAddProductC_64f (srcA, srcB, srcDst, len)); }
117
118 static void clampLow (const double* src, float thresh, double* dst, int len) { assertIppNoErr (ippsThreshold_LT_64f (src, dst, len, thresh)); }
119 static void clampHigh (const double* src, float thresh, double* dst, int len) { assertIppNoErr (ippsThreshold_GT_64f (src, dst, len, thresh)); }
120
121 static void ln (const double* src, double* dst, int len) { assertAllowedStatus<ippStsNoErr, ippStsSingularity> (ippsLn_64f (src, dst, len)); }
122 static void log10 (const double* src, double* dst, int len) { assertAllowedStatus<ippStsNoErr, ippStsSingularity> (ippsLog10_64f_A53 (src, dst, len)); }
123 static void exp (const double* src, double* dst, int len) { assertIppNoErr (ippsExp_64f (src, dst, len)); }
124 static void pow (const double* base, const double* exp, double* dst, int len) { assertIppNoErr (ippsPow_64f_A53 (base, exp, dst, len)); }
125 static void pow (const double* base, double exp, double* dst, int len) { assertIppNoErr (ippsPowx_64f_A53 (base, exp, dst, len)); }
126 static void sqrt (const double* src, double* dst, int len) { assertIppNoErr (ippsSqrt_64f (src, dst, len)); }
127
128 static void sin (const double* src, double* dst, int len) { assertIppNoErr (ippsSin_64f_A53 (src, dst, len)); }
129 static void cos (const double* src, double* dst, int len) { assertIppNoErr (ippsCos_64f_A53 (src, dst, len)); }
130 static void tan (const double* src, double* dst, int len) { assertIppNoErr (ippsTan_64f_A53 (src, dst, len)); }
131 static void asin (const double* src, double* dst, int len) { assertIppNoErr (ippsAsin_64f_A53 (src, dst, len)); }
132 static void acos (const double* src, double* dst, int len) { assertIppNoErr (ippsAcos_64f_A53 (src, dst, len)); }
133 static void atan (const double* src, double* dst, int len) { assertIppNoErr (ippsAtan_64f_A53 (src, dst, len)); }
134 static void sinh (const double* src, double* dst, int len) { assertIppNoErr (ippsSinh_64f_A53 (src, dst, len)); }
135 static void cosh (const double* src, double* dst, int len) { assertIppNoErr (ippsCosh_64f_A53 (src, dst, len)); }
136 static void tanh (const double* src, double* dst, int len) { assertIppNoErr (ippsTanh_64f_A53 (src, dst, len)); }
137 static void asinh (const double* src, double* dst, int len) { assertIppNoErr (ippsAsinh_64f_A53 (src, dst, len)); }
138 static void acosh (const double* src, double* dst, int len) { assertIppNoErr (ippsAcosh_64f_A53 (src, dst, len)); }
139 static void atanh (const double* src, double* dst, int len) { assertIppNoErr (ippsAtanh_64f_A53 (src, dst, len)); }
140
141 static double max (const double* src, int len) { double r; assertIppNoErr (ippsMax_64f (src, len, &r)); return r; }
142 static double maxAbs (const double* src, int len) { double r; assertIppNoErr (ippsMaxAbs_64f (src, len, &r)); return r; }
143 static double min (const double* src, int len) { double r; assertIppNoErr (ippsMin_64f (src, len, &r)); return r; }
144 static double minAbs (const double* src, int len) { double r; assertIppNoErr (ippsMinAbs_64f (src, len, &r)); return r; }
145 static double sum (const double* src, int len) { double r; assertIppNoErr (ippsSum_64f (src, len, &r)); return r; }
146 static double mean (const double* src, int len) { double r; assertIppNoErr (ippsMean_64f (src, len, &r)); return r;}
147 static double l2Norm (const double* src, int len) { double r; assertIppNoErr (ippsNorm_L2_64f (src, len, &r)); return r;}
148};
149
150template <>
151class IntelIPP<std::complex<float>>
152{
153private:
154 static auto fc (std::complex<float>* c) { return reinterpret_cast<Ipp32fc*> (c); }
155 static auto fc (const std::complex<float>* c) { return reinterpret_cast<const Ipp32fc*> (c); }
156 static auto fc (std::complex<float> c) { return *fc (&c); }
157
158public:
159 static void abs (const std::complex<float>* src, float* dst, int len) { assertIppNoErr (ippsAbs_32fc_A24 (fc (src), dst, len)); }
160 static void add (const std::complex<float>* srcA, const std::complex<float>* srcB, std::complex<float>* dst, int len) { assertIppNoErr (ippsAdd_32fc (fc (srcA), fc (srcB), fc (dst), len)); }
161 static void add (const std::complex<float>* srcA, std::complex<float> srcB, std::complex<float>* dst, int len) { assertIppNoErr (ippsAddC_32fc (fc (srcA), fc (srcB), fc (dst), len)); }
162 static void sub (const std::complex<float>* srcA, const std::complex<float>* srcB, std::complex<float>* dst, int len) { assertIppNoErr (ippsSub_32fc (fc (srcB), fc (srcA), fc (dst), len)); }
163 static void sub (const std::complex<float>* srcA, std::complex<float> srcB, std::complex<float>* dst, int len) { assertIppNoErr (ippsSubC_32fc (fc (srcA), fc (srcB), fc (dst), len)); }
164 static void sub (std::complex<float> srcA, const std::complex<float>* srcB, std::complex<float>* dst, int len) { assertIppNoErr (ippsSubCRev_32fc (fc (srcB), fc (srcA), fc (dst), len)); }
165 static void mul (const std::complex<float>* srcA, const std::complex<float>* srcB, std::complex<float>* dst, int len) { assertIppNoErr (ippsMul_32fc (fc (srcA), fc (srcB), fc (dst), len)); }
166 static void mul (const std::complex<float>* srcA, std::complex<float> srcB, std::complex<float>* dst, int len) { assertIppNoErr (ippsMulC_32fc (fc (srcA), fc (srcB), fc (dst), len)); }
167 static void div (const std::complex<float>* srcA, const std::complex<float>* srcB, std::complex<float>* dst, int len) { assertIppNoErr (ippsDiv_32fc (fc (srcB), fc (srcA), fc (dst), len)); }
168 static void div (const std::complex<float>* srcA, std::complex<float> srcB, std::complex<float>* dst, int len) { assertIppNoErr (ippsDivC_32fc (fc (srcA), fc (srcB), fc (dst), len)); }
169
170 static void multiplyAccumulate (const std::complex<float>* srcA, const std::complex<float>* srcB, std::complex<float>* srcDst, int len) { assertIppNoErr (ippsAddProduct_32fc (fc (srcA), fc (srcB), fc (srcDst), len)); }
171
172 static void angle (const std::complex<float>* src, float* dst, int len) { assertIppNoErr (ippsPhase_32fc (fc (src), dst, len)); }
173 static void powerSpectrum (const std::complex<float>* src, float* dst, int len) { assertIppNoErr (ippsPowerSpectr_32fc (fc (src), dst, len)); }
174 static void conj (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsConj_32fc (fc (src), fc (dst), len)); }
175 static void pow (const std::complex<float>* base, const std::complex<float>* exp, std::complex<float>* dst, int len) { assertIppNoErr (ippsPow_32fc_A24 (fc (base), fc (exp), fc (dst), len)); }
176 static void pow (const std::complex<float>* base, std::complex<float> exp, std::complex<float>* dst, int len) { assertIppNoErr (ippsPowx_32fc_A24 (fc (base), fc (exp), fc (dst), len)); }
177 static void sqrt (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsSqrt_32fc (fc (src), fc (dst), len)); }
178
179 static void sin (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsSin_32fc_A24 (fc (src), fc (dst), len)); }
180 static void cos (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsCos_32fc_A24 (fc(src), fc(dst), len)); }
181 static void tan (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsTan_32fc_A24 (fc(src), fc(dst), len)); }
182 static void asin (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsAsin_32fc_A24 (fc(src), fc(dst), len)); }
183 static void acos (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsAcos_32fc_A24 (fc(src), fc(dst), len)); }
184 static void atan (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsAtan_32fc_A24 (fc(src), fc(dst), len)); }
185 static void sinh (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsSinh_32fc_A24 (fc(src), fc(dst), len)); }
186 static void cosh (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsCosh_32fc_A24 (fc(src), fc(dst), len)); }
187 static void tanh (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsTanh_32fc_A24 (fc(src), fc(dst), len)); }
188 static void asinh (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsAsinh_32fc_A24 (fc(src), fc(dst), len)); }
189 static void acosh (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsAcosh_32fc_A24 (fc(src), fc(dst), len)); }
190 static void atanh (const std::complex<float>* src, std::complex<float>* dst, int len) { assertIppNoErr (ippsAtanh_32fc_A24 (fc(src), fc(dst), len)); }
191
192 static std::complex<float> sum (const std::complex<float>* src, int len) { std::complex<float> r; assertIppNoErr (ippsSum_32fc (fc (src), len, fc (&r), ippAlgHintNone)); return r; }
193 static std::complex<float> mean (const std::complex<float>* src, int len) { std::complex<float> r; assertIppNoErr (ippsMean_32fc (fc (src), len, fc (&r), ippAlgHintNone)); return r;}
194};
195
196template <>
197class IntelIPP<std::complex<double>>
198{
199private:
200 static auto fc (std::complex<double>* c) { return reinterpret_cast<Ipp64fc*> (c); }
201 static auto fc (const std::complex<double>* c) { return reinterpret_cast<const Ipp64fc*> (c); }
202 static auto fc (std::complex<double> c) { return *fc (&c); }
203
204public:
205 static void abs (const std::complex<double>* src, double* dst, int len) { assertIppNoErr (ippsAbs_64fc_A53 (fc (src), dst, len)); }
206 static void add (const std::complex<double>* srcA, const std::complex<double>* srcB, std::complex<double>* dst, int len) { assertIppNoErr (ippsAdd_64fc (fc (srcA), fc (srcB), fc (dst), len)); }
207 static void add (const std::complex<double>* srcA, std::complex<double> srcB, std::complex<double>* dst, int len) { assertIppNoErr (ippsAddC_64fc (fc (srcA), fc (srcB), fc (dst), len)); }
208 static void sub (const std::complex<double>* srcA, const std::complex<double>* srcB, std::complex<double>* dst, int len) { assertIppNoErr (ippsSub_64fc (fc (srcB), fc (srcA), fc (dst), len)); }
209 static void sub (const std::complex<double>* srcA, std::complex<double> srcB, std::complex<double>* dst, int len) { assertIppNoErr (ippsSubC_64fc (fc (srcA), fc (srcB), fc (dst), len)); }
210 static void sub (std::complex<double> srcA, const std::complex<double>* srcB, std::complex<double>* dst, int len) { assertIppNoErr (ippsSubCRev_64fc (fc (srcB), fc (srcA), fc (dst), len)); }
211 static void mul (const std::complex<double>* srcA, const std::complex<double>* srcB, std::complex<double>* dst, int len) { assertIppNoErr (ippsMul_64fc (fc (srcA), fc (srcB), fc (dst), len)); }
212 static void mul (const std::complex<double>* srcA, std::complex<double> srcB, std::complex<double>* dst, int len) { assertIppNoErr (ippsMulC_64fc (fc (srcA), fc (srcB), fc (dst), len)); }
213 static void div (const std::complex<double>* srcA, const std::complex<double>* srcB, std::complex<double>* dst, int len) { assertIppNoErr (ippsDiv_64fc (fc (srcB), fc (srcA), fc (dst), len)); }
214 static void div (const std::complex<double>* srcA, std::complex<double> srcB, std::complex<double>* dst, int len) { assertIppNoErr (ippsDivC_64fc (fc (srcA), fc (srcB), fc (dst), len)); }
215
216 static void multiplyAccumulate (const std::complex<double>* srcA, const std::complex<double>* srcB, std::complex<double>* srcDst, int len) { assertIppNoErr (ippsAddProduct_64fc (fc (srcA), fc (srcB), fc (srcDst), len)); }
217
218 static void angle (const std::complex<double>* src, double* dst, int len) { assertIppNoErr (ippsPhase_64fc (fc (src), dst, len)); }
219 static void powerSpectrum (const std::complex<double>* src, double* dst, int len) { assertIppNoErr (ippsPowerSpectr_64fc (fc (src), dst, len)); }
220 static void conj (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsConj_64fc (fc (src), fc (dst), len)); }
221 static void pow (const std::complex<double>* base, const std::complex<double>* exp, std::complex<double>* dst, int len) { assertIppNoErr (ippsPow_64fc_A53 (fc (base), fc (exp), fc (dst), len)); }
222 static void pow (const std::complex<double>* base, std::complex<double> exp, std::complex<double>* dst, int len) { assertIppNoErr (ippsPowx_64fc_A53 (fc (base), fc (exp), fc (dst), len)); }
223 static void sqrt (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsSqrt_64fc (fc (src), fc (dst), len)); }
224
225 static void sin (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsSin_64fc_A53 (fc (src), fc (dst), len)); }
226 static void cos (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsCos_64fc_A53 (fc (src), fc (dst), len)); }
227 static void tan (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsTan_64fc_A53 (fc (src), fc (dst), len)); }
228 static void asin (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsAsin_64fc_A53 (fc (src), fc (dst), len)); }
229 static void acos (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsAcos_64fc_A53 (fc (src), fc (dst), len)); }
230 static void atan (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsAtan_64fc_A53 (fc (src), fc (dst), len)); }
231 static void sinh (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsSinh_64fc_A53 (fc (src), fc (dst), len)); }
232 static void cosh (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsCosh_64fc_A53 (fc (src), fc (dst), len)); }
233 static void tanh (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsTanh_64fc_A53 (fc (src), fc (dst), len)); }
234 static void asinh (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsAsinh_64fc_A53 (fc (src), fc (dst), len)); }
235 static void acosh (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsAcosh_64fc_A53 (fc (src), fc (dst), len)); }
236 static void atanh (const std::complex<double>* src, std::complex<double>* dst, int len) { assertIppNoErr (ippsAtanh_64fc_A53 (fc (src), fc(dst), len)); }
237
238 static std::complex<double> sum (const std::complex<double>* src, int len) { std::complex<double> r; assertIppNoErr (ippsSum_64fc (fc (src), len, fc (&r))); return r; }
239 static std::complex<double> mean (const std::complex<double>* src, int len) { std::complex<double> r; assertIppNoErr (ippsMean_64fc (fc (src), len, fc (&r))); return r;}
240};
241
242template <>
243class IntelIPP<int32_t>
244{
245public:
246 static auto abs (const int32_t* src, int32_t* dst, int len) { assertIppNoErr (ippsAbs_32s (src, dst, len)); }
247};
248#endif
249
250// clang-format on
251
252} // namespace vctr::PlatformVectorOps
constexpr ExpressionChainBuilder< expressions::Log10 > log10
Computes the logarithm to the base of ten of the source values.
Definition: Log10.h:84
constexpr ExpressionChainBuilder< expressions::Sin > sin
Computes the sine of each source element.
Definition: Sin.h:88
constexpr ExpressionChainBuilder< expressions::Asinh > asinh
Computes the inverse hyperbolic sine of each source element.
Definition: Asinh.h:88
constexpr ExpressionChainBuilder< expressions::Exp > exp
Computes e (Euler's number, 2.7182818...) raised to the source vector elements power.
Definition: Exp.h:84
constexpr ExpressionChainBuilder< expressions::MinAbs > minAbs
Computes the minimum value of the absolute value of the source values.
Definition: Min.h:200
constexpr ExpressionChainBuilder< expressions::Asin > asin
Computes the inverse sine of each source element.
Definition: Asin.h:88
constexpr ExpressionChainBuilder< expressions::Acosh > acosh
Computes the inverse hyperbolic cosine of each source element.
Definition: Acosh.h:88
constexpr ExpressionChainBuilder< expressions::Mean > mean
Computes the mean value of the source values.
Definition: Mean.h:242
constexpr ExpressionChainBuilder< expressions::Atan > atan
Computes the inverse tangent of each source element.
Definition: Atan.h:88
constexpr ExpressionChainBuilder< expressions::Ln > ln
Computes the natural logarithm of the source values.
Definition: Ln.h:84
constexpr auto clampLow(T lowerBound)
Ensures that the elements are not lower than lowerBound.
Definition: Clamp.h:199
constexpr ExpressionChainBuilder< expressions::Cosh > cosh
Computes the hyperbolic cosine of each source element.
Definition: Cosh.h:88
constexpr ExpressionChainBuilder< expressions::Acos > acos
Computes the inverse cosine of each source element.
Definition: Acos.h:88
constexpr ExpressionChainBuilder< expressions::Cos > cos
Computes the cosine of each source element.
Definition: Cos.h:88
constexpr ExpressionChainBuilder< expressions::Tan > tan
Computes the tangent of each source element.
Definition: Tan.h:88
constexpr ExpressionChainBuilder< expressions::Sqrt > sqrt
Computes the square root of the source values.
Definition: Sqrt.h:83
constexpr ExpressionChainBuilder< expressions::Atanh > atanh
Computes the inverse hyperbolic tangent of each source element.
Definition: Atanh.h:88
constexpr auto pow(SrcBaseType &&bases, SrcExpType &&exponents)
Returns an expression that raises the elements in bases element-wise to the power of the elements in ...
Definition: Pow.h:211
constexpr auto clampHigh(T upperBound)
Ensures that the elements are not greater than upperBound.
Definition: Clamp.h:212
constexpr ExpressionChainBuilder< expressions::Sum > sum
Computes the sum of the source values.
Definition: Sum.h:116
constexpr ExpressionChainBuilder< expressions::Max > max
Computes the maximum value of the source values.
Definition: Max.h:194
constexpr ExpressionChainBuilder< expressions::Abs > abs
Computes the absolute value of the source values.
Definition: Abs.h:133
constexpr ExpressionChainBuilder< expressions::Angle > angle
Computes the phase angles of the complex source values.
Definition: Angle.h:67
constexpr ExpressionChainBuilder< expressions::Sinh > sinh
Computes the hyperbolic sine of each source element.
Definition: Sinh.h:88
constexpr ExpressionChainBuilder< expressions::Min > min
Computes the minimum value of the source values.
Definition: Min.h:194
constexpr ExpressionChainBuilder< expressions::PowerSpectrum > powerSpectrum
Computes the power spectrum of the complex source values.
Definition: PowerSpectrum.h:72
constexpr ExpressionChainBuilder< expressions::MaxAbs > maxAbs
Computes the maximum value of the absolute value of the source values.
Definition: Max.h:200
constexpr ExpressionChainBuilder< expressions::Tanh > tanh
Computes the hyperbolic tangent of each source element.
Definition: Tanh.h:88