kernel.cu, ppf_reduce_rows_kernel, I got rid of the memset commmand, because I was unclear on whether its behavior is defined on the device. Instead I added the thrust::fill function, #include <thrust/fill.h> and used it to set all the values of the accumulator to 0 after creation. Also, In light of the constraint upon the maximum number of blocks, I added a grid stride to all relevant kernels to make sure we cover all the inputs of interest.