mirror of git://gcc.gnu.org/git/gcc.git
[nvptx] Add asserts in nvptx_goacc_validate_dims
Add a few asserts to nvptx_goacc_validate_dims. 2019-01-07 Tom de Vries <tdevries@suse.de> * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Add asserts. From-SVN: r267625
This commit is contained in:
parent
43493c97a6
commit
21fbea5c33
|
|
@ -1,3 +1,7 @@
|
|||
2019-01-07 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
* config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Add asserts.
|
||||
|
||||
2019-01-07 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
* omp-offload.c (oacc_get_min_dim): New function.
|
||||
|
|
|
|||
|
|
@ -5421,6 +5421,10 @@ nvptx_goacc_validate_dims (tree decl, int dims[], int fn_level)
|
|||
|
||||
nvptx_goacc_validate_dims_1 (decl, dims, fn_level);
|
||||
|
||||
gcc_assert (dims[GOMP_DIM_VECTOR] != 0);
|
||||
if (dims[GOMP_DIM_WORKER] > 0 && dims[GOMP_DIM_VECTOR] > 0)
|
||||
gcc_assert (dims[GOMP_DIM_WORKER] * dims[GOMP_DIM_VECTOR] <= PTX_CTA_SIZE);
|
||||
|
||||
for (i = 0; i < GOMP_DIM_MAX; ++i)
|
||||
if (old_dims[i] != dims[i])
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue