diff options
author | David Schleef <ds@schleef.org> | 2005-08-03 03:37:13 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2005-08-03 03:37:13 +0000 |
commit | 62005683a6fcbf3062b123fce81ce490b7a352ae (patch) | |
tree | 81cd6282be838782fcd087fcd747dadcebc0fc39 | |
parent | 51d1229471320acad7a8d69ef1f8f5dfc723cafe (diff) | |
download | liboil-62005683a6fcbf3062b123fce81ce490b7a352ae.tar.gz |
* liboil/simdpack/scalarmult.c: Readd some implementations,
since they're unbroken now. (They still suck.)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | liboil/simdpack/scalarmult.c | 30 |
2 files changed, 35 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2005-08-02 David Schleef <ds@schleef.org> + * liboil/simdpack/scalarmult.c: Readd some implementations, + since they're unbroken now. (They still suck.) + +2005-08-02 David Schleef <ds@schleef.org> + * HACKING: some notes * configure.ac: readd _GNU_SOURCE * liboil/Makefile.am: add new dirs, create decls header diff --git a/liboil/simdpack/scalarmult.c b/liboil/simdpack/scalarmult.c index 1bd2772..130fdb0 100644 --- a/liboil/simdpack/scalarmult.c +++ b/liboil/simdpack/scalarmult.c @@ -178,4 +178,34 @@ SCALARMULT_DEFINE_UNROLL4 (f64); +#define SCALARMULT_DEFINE_X(type) \ +static void scalarmult_ ## type ## _x( \ + type_ ## type *dest, int dstr, \ + type_ ## type *src, int sstr, \ + type_ ## type *val, int n) \ +{ \ + int i; \ + for(i=0;i+1<n;i+=2){ \ + OIL_GET(dest, i*dstr,type_ ## type) = \ + OIL_GET(src, i*sstr,type_ ## type) * *val; \ + OIL_GET(dest,(i+1)*dstr,type_ ## type) = \ + OIL_GET(src,(i+1)*sstr,type_ ## type) * *val; \ + } \ + if (n&1) { \ + OIL_GET(dest,i*dstr,type_ ## type) = \ + OIL_GET(src,i*sstr,type_ ## type) * *val; \ + } \ +} \ +OIL_DEFINE_IMPL (scalarmult_ ## type ## _x, scalarmult_ ## type); + + +SCALARMULT_DEFINE_X (s8); +SCALARMULT_DEFINE_X (u8); +SCALARMULT_DEFINE_X (s16); +SCALARMULT_DEFINE_X (u16); +SCALARMULT_DEFINE_X (s32); +SCALARMULT_DEFINE_X (u32); +SCALARMULT_DEFINE_X (f32); +SCALARMULT_DEFINE_X (f64); + |