branchless.h 218 B

1234567
  1. #ifndef BRANCHLESS_H
  2. #define BRANCHLESS_H
  3. #define BL_MIN(v1, v2) ((((v1) >= (v2)) * (v2)) + (((v1) < (v2)) * (v1)))
  4. #define BL_MAX(v1, v2) ((((v1) >= (v2)) * (v1)) + (((v1) < (v2)) * (v2)))
  5. #endif /* BRANCHLESS_H */