]> git.sesse.net Git - narabu/blobdiff - narabu.cpp
Make blocks per stream a named constant.
[narabu] / narabu.cpp
index 11117f4fd9f9c744e62b4fe15a7b06b365120812..898f7efeec4b343a7b011bcea85b8376a223873a 100644 (file)
@@ -24,6 +24,7 @@ const unsigned prob_bits = 12;
 const unsigned prob_scale = 1 << prob_bits;
 const unsigned NUM_SYMS = 256;
 const unsigned NUM_TABLES = 8;
+const unsigned BLOCKS_PER_STREAM = 320;
 
 struct RansDecSymbol {
         unsigned sym_start;
@@ -266,7 +267,7 @@ int main(int argc, char **argv)
 #define PARALLEL_SLICES 1
        steady_clock::time_point start = steady_clock::now();
        for (int i = 0; i < 1000; ++i) {
-               unsigned num_slices = (WIDTH/8)*(HEIGHT/8)/320;
+               unsigned num_slices = (WIDTH/8)*(HEIGHT/8)/BLOCKS_PER_STREAM;
                glDispatchCompute(1, (num_slices+PARALLEL_SLICES-1)/PARALLEL_SLICES, 1);
        }
        check_error();