diff options
author | Matt Turner <mattst88@gmail.com> | 2009-08-11 04:01:08 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2009-08-11 04:01:08 +0000 |
commit | 37c2d4e8e6c66e51c132ffe99d2f98ec92eb3cc9 (patch) | |
tree | 0f60cadcc280d97e8a6ce995bb5ebc6ecfd96e1a /math.c | |
parent | 1b1ba4b2f4766e503a5072c46402689e7474cb25 (diff) |
Also build with ccc for benchmarking
git-svn-id: svn://mattst88.com/svn/cpml-benchmarks@3 dfcbb71e-afff-4d4a-b3c7-756acd92cddf
Diffstat (limited to 'math.c')
-rw-r--r-- | math.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -1,8 +1,19 @@ +#ifdef __DECC + +#include <machine/builtins.h> +#define __rpcc(x) __RPCC(x) +extern int printf (const char * format, ...); +#define M_PI 3.14159265358979323846 /* pi */ + +#elif defined __GNUC__ + +#define __rpcc(x) __builtin_alpha_rpcc(x) #include <stdio.h> #include <math.h> -#include <stdint.h> -#define __rpcc __builtin_alpha_rpcc +#else +#error Unknown compiler +#endif #define CPML "cpml" #define GLIBC "glibc" @@ -25,13 +36,14 @@ double FUNCTION(double); #define INCREMENT 0.1 #endif + int main(int argc, char * argv[]) { double x; double results[100]; int i; int iterations; - uint32_t start, end; + unsigned int start, end; start = __rpcc(); |