summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2006-01-28 21:16:44 +0000
committerDavid Schleef <ds@schleef.org>2006-01-28 21:16:44 +0000
commit4c9975b4cbb6f7f413480f5bd4648cdcddc48e4a (patch)
tree5a417887c1dabf92f619189fa5875c50ffbef28f /examples
parent49e692e38aefbe5ee2549b9cfc7327d9dd6e2bdd (diff)
* examples/oil-suggest.c: cleanup
* liboil/Makefile.am: clean liboil-stdint.h * liboil/liboilclasses.h: add splat_u16_ns * liboil/ref/splat.c: same * liboil/liboilfuncs-04.h: same * liboil/liboilfuncs.h: same * liboil/liboiltrampolines.c: same
Diffstat (limited to 'examples')
-rw-r--r--examples/oil-suggest.c118
1 files changed, 0 insertions, 118 deletions
diff --git a/examples/oil-suggest.c b/examples/oil-suggest.c
index 4c1c44e..3cb51d2 100644
--- a/examples/oil-suggest.c
+++ b/examples/oil-suggest.c
@@ -39,124 +39,6 @@
#include <string.h>
#include <stdarg.h>
-#if 0
-int retval = EXIT_SUCCESS;
-static void
-printerr (char *format, ...)
-{
- va_list var_args;
-
- va_start (var_args, format);
- vfprintf (stderr, format, var_args);
- va_end (var_args);
- retval = EXIT_FAILURE;
-}
-
-static char *
-string_append (char *str, const char *append)
-{
- char *ret;
- if (str) {
- size_t size = strlen (str) + 2 + strlen (append) + 1;
- ret = malloc (size);
- snprintf (ret, size, "%s, %s", str, append);
- free (str);
- } else {
- ret = strdup (append);
- }
- return ret;
-}
-static char *
-oil_flags_to_string (unsigned int flags)
-{
- char *ret = NULL;
-
- if (flags & OIL_IMPL_FLAG_REF)
- ret = string_append (ret, "REF");
- if (flags & OIL_IMPL_FLAG_OPT)
- ret = string_append (ret, "altopt");
- if (flags & OIL_IMPL_FLAG_ASM)
- ret = string_append (ret, "asm");
-#ifdef HAVE_CPU_I386
- if (flags & OIL_IMPL_FLAG_CMOV)
- ret = string_append (ret, "cmov");
- if (flags & OIL_IMPL_FLAG_MMX)
- ret = string_append (ret, "mmx");
- if (flags & OIL_IMPL_FLAG_SSE)
- ret = string_append (ret, "sse");
- if (flags & OIL_IMPL_FLAG_MMXEXT)
- ret = string_append (ret, "mmxext");
- if (flags & OIL_IMPL_FLAG_SSE2)
- ret = string_append (ret, "sse2");
- if (flags & OIL_IMPL_FLAG_3DNOW)
- ret = string_append (ret, "3dnow");
- if (flags & OIL_IMPL_FLAG_3DNOWEXT)
- ret = string_append (ret, "3dnowext");
-#endif
-#ifdef HAVE_CPU_PPC
- if (flags & OIL_IMPL_FLAG_ALTIVEC)
- ret = string_append (ret, "altivec");
-#endif
- return ret;
-}
-#endif
-
-#if 0
-static void
-oil_print_impl (OilFunctionImpl *impl, OilTest *test, char* prefix)
-{
- char *c;
- unsigned int cpu_flags = oil_cpu_get_flags();
-
- oil_test_check_impl (test, impl);
-
- printf ("%s%s\n", prefix, impl->name);
- c = oil_flags_to_string (impl->flags);
- if (c) {
- printf ("%s flags: %s\n", prefix, c);
- free (c);
- }
- if (impl->profile_ave) {
- printf ("%s profile: %g ticks (std.dev. %g)\n", prefix, impl->profile_ave,
- impl->profile_std);
- }
- if (test && !(impl->flags & OIL_IMPL_FLAG_REF)) {
- printf ("%s sum abs difference: %g (n=%d)\n", prefix,
- test->sum_abs_diff, test->n_points);
- }
- if ((impl->flags & OIL_CPU_FLAG_MASK) & (~cpu_flags)) {
- printf ("%s disabled\n", prefix);
- }
-}
-#endif
-
-#if 0
-static int
-impl_compare (const void *a, const void *b)
-{
- const OilFunctionImpl *ia = *(OilFunctionImpl **)a;
- const OilFunctionImpl *ib = *(OilFunctionImpl **)b;
-
- if (ia->profile_ave < ib->profile_ave) return -1;
- if (ia->profile_ave > ib->profile_ave) return 1;
- return 0;
-}
-#endif
-
-#if 0
-static int
-get_n_impls(OilFunctionClass *klass)
-{
- OilFunctionImpl *impl;
- int n;
-
- n = 0;
- for(impl=klass->first_impl;impl;impl=impl->next)n++;
-
- return n;
-}
-#endif
-
static int
is_poorly_strided (OilFunctionClass *klass)
{