regressions/ck_cc: basic coverage for ck_cc.

cos
Samy Al Bahra 7 years ago
parent f00aaa977b
commit f18ec01c16

@ -4,6 +4,7 @@ DIR=array \
bitmap \
brlock \
bytelock \
cc \
cohort \
epoch \
fifo \
@ -27,6 +28,7 @@ DIR=array \
all:
$(MAKE) -C ./ck_array/validate all
$(MAKE) -C ./ck_cc/validate all
$(MAKE) -C ./ck_cohort/validate all
$(MAKE) -C ./ck_cohort/benchmark all
$(MAKE) -C ./ck_bitmap/validate all
@ -72,6 +74,7 @@ all:
clean:
$(MAKE) -C ./ck_array/validate clean
$(MAKE) -C ./ck_cc/validate clean
$(MAKE) -C ./ck_pflock/validate clean
$(MAKE) -C ./ck_pflock/benchmark clean
$(MAKE) -C ./ck_tflock/validate clean

@ -0,0 +1,18 @@
#include <ck_pr.h>
#include <stdio.h>
#include "../../common.h"
int
main(void)
{
unsigned int x;
ck_pr_store_uint(&x, 4);
printf(" ffs = %d\n", ck_cc_ffs(x));
printf(" clz = %d\n", ck_cc_clz(x));
printf(" ctz = %d\n", ck_cc_ctz(x));
printf("popcount = %d\n", ck_cc_popcount(x));
return 0;
}
Loading…
Cancel
Save