*/
-#include "lp_bld_const.h"
+#include "util/u_cpu_detect.h"
+
+#include "gallivm/lp_bld_const.h"
+#include "gallivm/lp_bld_init.h"
#include "lp_test.h"
+#ifdef PIPE_CC_MSVC
+static INLINE double
+round(double x)
+{
+ if (x >= 0.0)
+ return floor(x + 0.5);
+ else
+ return ceil(x - 0.5);
+}
+#endif
+
+
void
dump_type(FILE *fp,
struct lp_type type)
unsigned long n = 1000;
unsigned i;
boolean success;
+ boolean single = FALSE;
for(i = 1; i < argc; ++i) {
if(strcmp(argv[i], "-v") == 0)
++verbose;
+ else if(strcmp(argv[i], "-s") == 0)
+ single = TRUE;
else if(strcmp(argv[i], "-o") == 0)
fp = fopen(argv[++i], "wt");
else
n = atoi(argv[i]);
}
-#ifdef LLVM_NATIVE_ARCH
- LLVMLinkInJIT();
- LLVMInitializeNativeTarget();
-#endif
+ lp_build_init();
+
+ util_cpu_detect();
if(fp) {
/* Warm up the caches */
write_tsv_header(fp);
}
- if(n)
+ if (single)
+ success = test_single(verbose, fp);
+ else if (n)
success = test_some(verbose, fp, n);
else
success = test_all(verbose, fp);