Skip to content

Commit

Permalink
util/gpu_t.cuh: make launch_params_t more forgiving.
Browse files Browse the repository at this point in the history
  • Loading branch information
dot-asm committed Feb 29, 2024
1 parent d3d17ad commit 2e56622
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util/gpu_t.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ struct launch_params_t {
size_t shared;

launch_params_t(dim3 g, dim3 b, size_t sz = 0) : gridDim(g), blockDim(b), shared(sz) {}
launch_params_t(int g, int b, size_t sz = 0) : gridDim(g), blockDim(b), shared(sz) {}
launch_params_t(int g, int b, size_t sz = 0) : gridDim(g>0 ? g : 0), blockDim(b), shared(sz) {}
launch_params_t(unsigned int g, unsigned int b, size_t sz = 0) : gridDim(g), blockDim(b), shared(sz) {}

};

class stream_t {
Expand Down

0 comments on commit 2e56622

Please sign in to comment.