target: fail build on too small sizes
authorSebastian <git@sraa.de>
Mon, 28 Jul 2014 14:35:05 +0000 (14:35 +0000)
committerSebastian <git@sraa.de>
Mon, 28 Jul 2014 14:35:05 +0000 (14:35 +0000)
at least 1x1 cores and 3x3 blocks, please.

lb/esrc/lb_2d.c

index ff086a1cc09ecb5f1aa8981aa1db6b07a2228b6b..19bbf11426817e71832907e78f4ccbec014ffc43 100644 (file)
@@ -36,6 +36,8 @@ void init(void)
 {
        /* compile-time checks */
        BUILD_BUG(BLOCK_X * BLOCK_Y * sizeof(d2q9_node_t) > 24*1024);
+       BUILD_BUG(BLOCK_X < 3 || BLOCK_Y < 3);
+       BUILD_BUG(CORES_X < 1 || CORES_Y < 1);
        BUILD_BUG(CORES_X > 4 || CORES_Y > 4);
 
        /* core index */