|
38 | 38 | #include "isl/map.h" |
39 | 39 | #include "isl/mat.h" |
40 | 40 | #include "isl/set.h" |
41 | | -#include "isl/val.h" |
42 | 41 | #include "isl/space.h" |
43 | 42 | #include "isl/union_map.h" |
| 43 | +#include "isl/val.h" |
44 | 44 |
|
45 | 45 | /* |
46 | 46 | * Converts a [A c] pluto transformations to a [eq -I A c] osl scattering |
@@ -1253,8 +1253,15 @@ static void compute_deps_osl(osl_scop_p scop, PlutoProg *prog, |
1253 | 1253 | dom = osl_relation_list_to_isl_set(stmt->domain, space); |
1254 | 1254 | dom = isl_set_intersect_params(dom, isl_set_copy(context)); |
1255 | 1255 |
|
1256 | | - space = isl_space_alloc(ctx, scop->context->nb_parameters, niter, |
1257 | | - 2 * niter + 1); |
| 1256 | + int nb_parameters = OSL_UNDEFINED; |
| 1257 | + int nb_iterators = OSL_UNDEFINED; |
| 1258 | + int nb_scattdims = OSL_UNDEFINED; |
| 1259 | + int nb_localdims = OSL_UNDEFINED; |
| 1260 | + int array_id = OSL_UNDEFINED; |
| 1261 | + osl_relation_get_attributes(stmt->scattering, &nb_parameters, |
| 1262 | + &nb_iterators, &nb_scattdims, &nb_localdims, |
| 1263 | + &array_id); |
| 1264 | + space = isl_space_alloc(ctx, nb_parameters, nb_iterators, nb_scattdims); |
1258 | 1265 | if (scop->context->nb_parameters) { |
1259 | 1266 | scop_params = (osl_strings_p)scop->parameters->data; |
1260 | 1267 | space = set_names(space, isl_dim_param, scop_params->string); |
@@ -1307,7 +1314,6 @@ static void compute_deps_osl(osl_scop_p scop, PlutoProg *prog, |
1307 | 1314 | isl_map *read_pos; |
1308 | 1315 | isl_map *write_pos; |
1309 | 1316 | isl_map *schedule_i; |
1310 | | - |
1311 | 1317 | char name[25]; |
1312 | 1318 |
|
1313 | 1319 | if (access->elt->type == OSL_TYPE_READ) { |
@@ -1337,8 +1343,16 @@ static void compute_deps_osl(osl_scop_p scop, PlutoProg *prog, |
1337 | 1343 | dom = osl_relation_list_to_isl_set(stmt->domain, space); |
1338 | 1344 | dom = isl_set_intersect_params(dom, isl_set_copy(context)); |
1339 | 1345 |
|
1340 | | - space = isl_space_alloc(ctx, scop->context->nb_parameters, niter, |
1341 | | - 2 * niter + 1); |
| 1346 | + int nb_parameters = OSL_UNDEFINED; |
| 1347 | + int nb_iterators = OSL_UNDEFINED; |
| 1348 | + int nb_scattdims = OSL_UNDEFINED; |
| 1349 | + int nb_localdims = OSL_UNDEFINED; |
| 1350 | + int array_id = OSL_UNDEFINED; |
| 1351 | + osl_relation_get_attributes(stmt->scattering, &nb_parameters, |
| 1352 | + &nb_iterators, &nb_scattdims, &nb_localdims, |
| 1353 | + &array_id); |
| 1354 | + space = isl_space_alloc(ctx, scop->context->nb_parameters, nb_iterators, |
| 1355 | + nb_scattdims); |
1342 | 1356 | if (scop->context->nb_parameters) { |
1343 | 1357 | scop_params = (osl_strings_p)scop->parameters->data; |
1344 | 1358 | space = set_names(space, isl_dim_param, scop_params->string); |
|
0 commit comments