Adopted compile-time LFS_MIN/LFS_MAX in test defines

These seem fitting here, even if the test defines aren't "real defines".
The duplicate expressions should still be side-effect free and easy to
optimize out.

This should also avoid future lfs_min32 vs intmax_t issues.
This commit is contained in:
Christopher Haster
2024-05-14 14:42:09 -05:00
parent 4672fb59ca
commit 5c70013c11
5 changed files with 36 additions and 36 deletions
+2 -2
View File
@@ -115,8 +115,8 @@ void bench_permutation(size_t i, uint32_t *buffer, size_t size);
BENCH_DEFINE(BLOCK_SIZE, 4096 ) \
BENCH_DEFINE(BLOCK_COUNT, DISK_SIZE/BLOCK_SIZE ) \
BENCH_DEFINE(DISK_SIZE, 1024*1024 ) \
BENCH_DEFINE(RCACHE_SIZE, lfs_max(16, READ_SIZE) ) \
BENCH_DEFINE(PCACHE_SIZE, lfs_max(16, PROG_SIZE) ) \
BENCH_DEFINE(RCACHE_SIZE, LFS_MAX(16, READ_SIZE) ) \
BENCH_DEFINE(PCACHE_SIZE, LFS_MAX(16, PROG_SIZE) ) \
BENCH_DEFINE(FBUFFER_SIZE, 16 ) \
BENCH_DEFINE(LOOKAHEAD_SIZE, 16 ) \
BENCH_DEFINE(INLINE_SIZE, BLOCK_SIZE/4 ) \
+2 -2
View File
@@ -99,8 +99,8 @@ void test_permutation(size_t i, uint32_t *buffer, size_t size);
TEST_DEFINE(BLOCK_SIZE, 4096 ) \
TEST_DEFINE(BLOCK_COUNT, DISK_SIZE/BLOCK_SIZE ) \
TEST_DEFINE(DISK_SIZE, 1024*1024 ) \
TEST_DEFINE(RCACHE_SIZE, lfs_max(16, READ_SIZE) ) \
TEST_DEFINE(PCACHE_SIZE, lfs_max(16, PROG_SIZE) ) \
TEST_DEFINE(RCACHE_SIZE, LFS_MAX(16, READ_SIZE) ) \
TEST_DEFINE(PCACHE_SIZE, LFS_MAX(16, PROG_SIZE) ) \
TEST_DEFINE(FBUFFER_SIZE, 16 ) \
TEST_DEFINE(LOOKAHEAD_SIZE, 16 ) \
TEST_DEFINE(INLINE_SIZE, BLOCK_SIZE/4 ) \