-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfastexp.cpp
43 lines (31 loc) · 853 Bytes
/
fastexp.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "fastexp.h"
#include "math.h"
#define DLL_PUBLIC __attribute__ ((visibility ("default")))
using fastexp::IEEE;
using fastexp::Product;
extern "C" {
float exp_s(float x) {
return fastexp::exp(x);
}
double exp_d(double x) {
return fastexp::exp(x);
}
void exp_v_s(float *x, size_t n) {
fastexp::exp<float>(x, n);
}
void exp_v_d(double *x, size_t n) {
fastexp::exp<double>(x, n);
}
void exp256_v_s(float *x, size_t n) {
fastexp::exp<float, Product, 8>(x, n);
}
void exp256_v_d(double *x, size_t n) {
fastexp::exp<double, Product, 8>(x, n);
}
void exp1024_v_s(float *x, size_t n) {
fastexp::exp<float, Product, 10>(x, n);
}
void exp1024_v_d(double *x, size_t n) {
fastexp::exp<double, Product, 10>(x, n);
}
}