adam-maj / tiny-gpu

A minimal GPU design in Verilog to learn how GPUs work from the ground up
7.12k stars 538 forks source link

why total_blocks = (thread_count + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK #29

Closed dimory closed 6 months ago

dimory commented 6 months ago

hello, thank you for sharing your excellent project. but i have a question why use (thread_count + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK to caculate total_blocks. Best Regards.