diff options
author | David Schleef <ds@schleef.org> | 2005-08-01 09:49:20 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2005-08-01 09:49:20 +0000 |
commit | 6221d08ea2092d1e8d8429ea4b24554f88ada1c9 (patch) | |
tree | 97138e634276d5d241dd7ba948610e02ad35114e /liboil/simdpack | |
parent | 48c9a788517b68892535519456a3fb4424408890 (diff) | |
download | liboil-6221d08ea2092d1e8d8429ea4b24554f88ada1c9.tar.gz |
* Makefile.am: add 'foreign' to automake flags
* configure.ac: add some dirs
* examples/Makefile.am: same
* examples/memcpy-speed.c: (main): change back to gromit's cpu
* examples/oil-inspect.c: (oil_print_impl): Don't run non-runnable
implementations.
* examples/oil-test.c: (dump_array), (main): minor fixes
* examples/taylor/Makefile.am: new
* examples/taylor/example1.c: new
* liboil/Makefile.am: add dirs
* liboil/colorspace/composite.c: (composite_over_argb_noclamp_2):
alternate clamping version
* liboil/simdpack/scalarmult.c: add unrolled impls
* testsuite/instruction/check-instructions.pl: fixes
* liboil/fb/Makefile.am: new
* liboil/fb/fbmmx.h: new
* liboil/fb/fbmmx.c: new
Diffstat (limited to 'liboil/simdpack')
-rw-r--r-- | liboil/simdpack/scalarmult.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/liboil/simdpack/scalarmult.c b/liboil/simdpack/scalarmult.c index f4d8bb3..446f5c1 100644 --- a/liboil/simdpack/scalarmult.c +++ b/liboil/simdpack/scalarmult.c @@ -176,3 +176,30 @@ 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<n;i+=2){ \ + dest[i] = src[i] * *val; \ + dest[i+1] = src[i+1] * *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); |