173 {
174
175
176 const char* dotproduct_method = "generic";
177 if (!strcmp(dotproduct.string(), "auto")) {
178
179 } else if (!strcmp(dotproduct.string(), "generic")) {
180
181 SetDotProduct(DotProductGeneric);
182 dotproduct_method = "generic";
183 } else if (!strcmp(dotproduct.string(), "native")) {
184
186 dotproduct_method = "native";
187#if defined(AVX2)
188 } else if (!strcmp(dotproduct.string(), "avx2")) {
189
191 dotproduct_method = "avx2";
192#endif
193#if defined(AVX)
194 } else if (!strcmp(dotproduct.string(), "avx")) {
195
197 dotproduct_method = "avx";
198#endif
199#if defined(FMA)
200 } else if (!strcmp(dotproduct.string(), "fma")) {
201
203 dotproduct_method = "fma";
204#endif
205#if defined(SSE4_1)
206 } else if (!strcmp(dotproduct.string(), "sse")) {
207
209 dotproduct_method = "sse";
210#endif
211 } else if (!strcmp(dotproduct.string(), "std::inner_product")) {
212
213 SetDotProduct(DotProductStdInnerProduct);
214 dotproduct_method = "std::inner_product";
215 } else {
216
217 tprintf(
"Warning, ignoring unsupported config variable value: dotproduct=%s\n",
218 dotproduct.string());
219 tprintf(
"Support values for dotproduct: auto generic native"
220#if defined(AVX)
221 " avx"
222#endif
223#if defined(SSE4_1)
224 " sse"
225#endif
226 " std::inner_product.\n");
227 }
228
229 dotproduct.set_value(dotproduct_method);
230}
DLLSYM void tprintf(const char *format,...)
double DotProductAVX(const double *u, const double *v, int n)
double DotProductNative(const double *u, const double *v, int n)
double DotProductFMA(const double *u, const double *v, int n)
double DotProductSSE(const double *u, const double *v, int n)
static const IntSimdMatrix intSimdMatrixAVX2
static const IntSimdMatrix * intSimdMatrix
static const IntSimdMatrix intSimdMatrixSSE