diff options
author | David Schleef <ds@schleef.org> | 2005-01-10 01:10:14 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2005-01-10 01:10:14 +0000 |
commit | 8e5ae77db51d5d3ab2f9f90d87294d2a6f5d6dbb (patch) | |
tree | a683eb174d520f0236c5fe5c0f4ed55a98860fae /examples | |
parent | a3964318ce4288213110f15b6675289f0a11459c (diff) | |
download | liboil-8e5ae77db51d5d3ab2f9f90d87294d2a6f5d6dbb.tar.gz |
* examples/work/work.c: (test), (main): misc changes
* liboil/conv/conv_3dnow.c: (conv_f32_s16_3dnow),
(conv_s32_f32_3dnow): fix asm
* liboil/conv/conv_bitstuff.c: disable brokenness
* liboil/liboilprofile.h: fix s390 profiling
* liboil/simdpack/Makefile.am:
* liboil/simdpack/clip_fast.c: (clip_s16_fast), (clip_s16_fast2),
(clip_s32_fast): merge clip_s16.c and clip_s32.c
* liboil/simdpack/clip_s16.c: remove
* liboil/simdpack/clip_s32.c: remove
* testsuite/Makefile.am: glib fixes
* testsuite/proto3.c: (check_param): fail if problem
* testsuite/stride.c: (main): same
Diffstat (limited to 'examples')
-rw-r--r-- | examples/work/work.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/work/work.c b/examples/work/work.c index 8a05c18..4f7882d 100644 --- a/examples/work/work.c +++ b/examples/work/work.c @@ -43,7 +43,7 @@ void register_impls(void); void test(void) { int16_t dest[100]; - int16_t src[100]; + float src[100]; int i; for(i=0;i<100;i++){ @@ -51,10 +51,10 @@ void test(void) dest[i] = 0; } - oil_abs_u16_s16 (dest, 4, src, 4, 50); + oil_conv_s16_f32 (dest, 2, src, 4, 100); for(i=0;i<100;i++){ - g_print("%d %d\n",dest[i],src[i]); + g_print("%d %g\n",dest[i],src[i]); } } @@ -63,19 +63,16 @@ int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; - unsigned long cpu_flags; oil_init (); - cpu_flags = oil_cpu_get_flags (); - //register_impls(); - klass = oil_class_get ("abs_u16_s16"); + klass = oil_class_get ("conv_s16_f32"); oil_class_optimize (klass); for (impl = klass->first_impl; impl; impl = impl->next) { - if (((impl->flags & OIL_CPU_FLAG_MASK) & ~cpu_flags) == 0) { + if (oil_impl_is_runnable (impl)) { klass->chosen_impl = impl; klass->func = impl->func; g_print("impl %s %g %g\n", impl->name, impl->profile_ave, |