Add benchmarks for ck_pr_add_64(), ck_pr_faa_64() and ck_pr_neg_64().

ck_pring
Alexey Kopytov 8 years ago
parent d8d5b01a1a
commit 696ae6e995

@ -1,6 +1,6 @@
.PHONY: clean .PHONY: clean
all: ck_pr_cas_64 ck_pr_fas_64 ck_pr_cas_64_2 fp all: ck_pr_cas_64 ck_pr_fas_64 ck_pr_cas_64_2 ck_pr_add_64 ck_pr_faa_64 ck_pr_neg_64 fp
fp: fp.c fp: fp.c
$(CC) $(CFLAGS) -o fp fp.c $(CC) $(CFLAGS) -o fp fp.c
@ -14,8 +14,18 @@ ck_pr_cas_64: ck_pr_cas_64.c
ck_pr_fas_64: ck_pr_fas_64.c ck_pr_fas_64: ck_pr_fas_64.c
$(CC) $(CFLAGS) -o ck_pr_fas_64 ck_pr_fas_64.c -lm $(CC) $(CFLAGS) -o ck_pr_fas_64 ck_pr_fas_64.c -lm
ck_pr_add_64: ck_pr_add_64.c
$(CC) $(CFLAGS) -o ck_pr_add_64 ck_pr_add_64.c -lm
ck_pr_faa_64: ck_pr_faa_64.c
$(CC) $(CFLAGS) -o ck_pr_faa_64 ck_pr_faa_64.c -lm
ck_pr_neg_64: ck_pr_neg_64.c
$(CC) $(CFLAGS) -o ck_pr_neg_64 ck_pr_neg_64.c -lm
clean: clean:
rm -rf ck_pr_cas_64 ck_pr_fas_64 ck_pr_cas_64_2 *.dSYM *.exe rm -rf ck_pr_cas_64 ck_pr_fas_64 ck_pr_cas_64_2 ck_pr_add_64 \
ck_pr_faa_64 ck_pr_neg_64 *.dSYM *.exe
include ../../../build/regressions.build include ../../../build/regressions.build
CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE CFLAGS+=$(PTHREAD_CFLAGS) -D_GNU_SOURCE

@ -0,0 +1,16 @@
#include <ck_pr.h>
#ifdef CK_F_PR_ADD_64
#define ATOMIC ck_pr_add_64(object, 1)
#define ATOMIC_STRING "ck_pr_add_64"
#include "benchmark.h"
#else
#warning Did not find ADD_64 implementation.
#include <stdlib.h>
int
main(void)
{
exit(EXIT_FAILURE);
}
#endif

@ -0,0 +1,16 @@
#include <ck_pr.h>
#ifdef CK_F_PR_FAA_64
#define ATOMIC ck_pr_faa_64(object, 1)
#define ATOMIC_STRING "ck_pr_faa_64"
#include "benchmark.h"
#else
#warning Did not find FAA_64 implementation.
#include <stdlib.h>
int
main(void)
{
exit(EXIT_FAILURE);
}
#endif

@ -0,0 +1,16 @@
#include <ck_pr.h>
#ifdef CK_F_PR_NEG_64
#define ATOMIC ck_pr_neg_64(object)
#define ATOMIC_STRING "ck_pr_neg_64"
#include "benchmark.h"
#else
#warning Did not find NEG_64 implementation.
#include <stdlib.h>
int
main(void)
{
exit(EXIT_FAILURE);
}
#endif
Loading…
Cancel
Save