option for using SLEEF library
This commit is contained in:
parent
9d90d0ec9b
commit
ccc3d7b409
|
|
@ -69,6 +69,10 @@
|
||||||
#include "b3v32ldsimd8d.c"
|
#include "b3v32ldsimd8d.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if NSIMD==2
|
||||||
|
#include "b3v32ldsimd2d.c"
|
||||||
|
#endif
|
||||||
|
|
||||||
int BSIM3v32LoadSIMD(BSIM3v32instance **heres, CKTcircuit *ckt
|
int BSIM3v32LoadSIMD(BSIM3v32instance **heres, CKTcircuit *ckt
|
||||||
#ifndef USE_OMP
|
#ifndef USE_OMP
|
||||||
, double data[7][NSIMD]
|
, double data[7][NSIMD]
|
||||||
|
|
@ -91,6 +95,12 @@ int BSIM3v32LoadSIMD(BSIM3v32instance **heres, CKTcircuit *ckt
|
||||||
#else
|
#else
|
||||||
#include "b3v32ldseq_simd8d.c"
|
#include "b3v32ldseq_simd8d.c"
|
||||||
#endif
|
#endif
|
||||||
|
#elif NSIMD==2
|
||||||
|
#ifdef USE_OMP
|
||||||
|
#include "b3v32ldseq_simd2d_omp.c"
|
||||||
|
#else
|
||||||
|
#include "b3v32ldseq_simd2d.c"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#error Unsupported value for NSIMD
|
#error Unsupported value for NSIMD
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,23 @@
|
||||||
#define USE_OMPSIMD
|
#define USE_OMPSIMD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define vec4_pow0p7(x,p) vec4_pow(x,p)
|
||||||
|
#define vec4_powMJ(x,p) vec4_pow(x,p)
|
||||||
|
#define vec4_powMJSW(x,p) vec4_pow(x,p)
|
||||||
|
#define vec4_powMJSWG(x,p) vec4_pow(x,p)
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_SLEEF
|
||||||
|
#include <sleef.h>
|
||||||
|
#define vec4_exp(a) Sleef_expd4_u10(a)
|
||||||
|
#define vec4_log(a) Sleef_logd4_u35(a)
|
||||||
|
#define vec4_MAX(a,b) Sleef_fmaxd4(a,b)
|
||||||
|
#define vec4_sqrt(a) Sleef_sqrtd4_u35(a)
|
||||||
|
#define vec4_fabs(a) Sleef_fabsd4(a)
|
||||||
|
#define vec4_pow(a,b) Sleef_powd4_u10(a,vec4_SIMDTOVECTOR(b))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* HAS_LIBMVEC defined from configure.ac */
|
/* HAS_LIBMVEC defined from configure.ac */
|
||||||
|
|
||||||
/* USE_SERIAL_FORM can be defined but has no performance influence */
|
/* USE_SERIAL_FORM can be defined but has no performance influence */
|
||||||
|
|
@ -56,6 +73,7 @@ static inline Vec4d vec4_blend(Vec4d fa, Vec4d tr, Vec4m mask)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef USE_SLEEF
|
||||||
/******* vec4_exp, vec4_log *******/
|
/******* vec4_exp, vec4_log *******/
|
||||||
#ifdef HAS_LIBMVEC
|
#ifdef HAS_LIBMVEC
|
||||||
Vec4d _ZGVdN4v_exp(Vec4d x);
|
Vec4d _ZGVdN4v_exp(Vec4d x);
|
||||||
|
|
@ -137,17 +155,14 @@ static inline Vec4d vec4_fabs(Vec4d x)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define vec4_pow0p7(x,p) vec4_pow(x,p)
|
|
||||||
#define vec4_powMJ(x,p) vec4_pow(x,p)
|
|
||||||
#define vec4_powMJSW(x,p) vec4_pow(x,p)
|
|
||||||
#define vec4_powMJSWG(x,p) vec4_pow(x,p)
|
|
||||||
|
|
||||||
static inline Vec4d vec4_pow(Vec4d x, double p)
|
static inline Vec4d vec4_pow(Vec4d x, double p)
|
||||||
{
|
{
|
||||||
/*return _ZGVdN4vv_pow(x,(Vec4d) {p,p,p,p});*/
|
/*return _ZGVdN4vv_pow(x,(Vec4d) {p,p,p,p});*/
|
||||||
return vec4_exp(vec4_log(x)*p);
|
return vec4_exp(vec4_log(x)*p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* USE_SLEEF */
|
||||||
|
|
||||||
/******* vec4_SIMDTOVECTOR, vec4_SIMDTOVECTORMASK *******/
|
/******* vec4_SIMDTOVECTOR, vec4_SIMDTOVECTORMASK *******/
|
||||||
#ifdef USE_SERIAL_FORM
|
#ifdef USE_SERIAL_FORM
|
||||||
static inline Vec4d vec4_SIMDTOVECTOR(double val)
|
static inline Vec4d vec4_SIMDTOVECTOR(double val)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue