summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjonsykkel <jonrevold@gmail.com>2021-09-08 07:27:55 +0200
committerjonsykkel <jonrevold@gmail.com>2021-09-08 07:27:55 +0200
commit2433c32a46d050129864f5488519dfee40fd9635 (patch)
tree133fcbabbc65c782b14554ff899d4ad0fe05fb27
parent77bb81e4f5d101a8858c667537df18a56a5681ef (diff)
downloadokeffa-2433c32a46d050129864f5488519dfee40fd9635.tar.gz
bitnes
-rw-r--r--inc/okeffa/fz_basic.h8
-rw-r--r--src/fz_basic.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/inc/okeffa/fz_basic.h b/inc/okeffa/fz_basic.h
index b7d6590..c284184 100644
--- a/inc/okeffa/fz_basic.h
+++ b/inc/okeffa/fz_basic.h
@@ -11,4 +11,12 @@ void fz_mux (word_t *a,word_t *b,word_t *o,size_t len,wbool_
void fz_frombool (word_t *a,size_t len,wbool_t b);
+inline size_t fz_bitness (size_t len);
+
+////////////////////////////////////////////////////////////////
+
+inline size_t fz_bitness(size_t len){
+ return len*WORD_BITNESS;
+}
+
#endif
diff --git a/src/fz_basic.c b/src/fz_basic.c
index a22e485..521f926 100644
--- a/src/fz_basic.c
+++ b/src/fz_basic.c
@@ -1,6 +1,8 @@
#include <okeffa/fz_basic.h>
#include <okeffa/w_op.h>
+extern size_t fz_bitness (size_t len);
+
void fz_copy(word_t *a,word_t *o,size_t len){
for(size_t x = 0;x < len;x++){
o[x] = a[x];