Jelajahi Sumber

Adding lib branchless.h

Vinicius Teshima 1 tahun lalu
induk
melakukan
5a20562c89
1 mengubah file dengan 7 tambahan dan 0 penghapusan
  1. 7 0
      C/branchless.h

+ 7 - 0
C/branchless.h

@@ -0,0 +1,7 @@
+#ifndef BRANCHLESS_H
+#define BRANCHLESS_H
+
+#define BL_MIN(v1, v2) ((((v1) >= (v2)) * (v2)) + (((v1) < (v2)) * (v1)))
+#define BL_MAX(v1, v2) ((((v1) >= (v2)) * (v1)) + (((v1) < (v2)) * (v2)))
+
+#endif /* BRANCHLESS_H */