18
18
19
19
#include " tc/core/check.h"
20
20
#include " tc/core/polyhedral/cuda/mapping_types.h"
21
+ #include " tc/core/polyhedral/cuda/mapped_scop.h"
21
22
#include " tc/core/polyhedral/exceptions.h"
22
23
#include " tc/core/polyhedral/functional.h"
23
24
#include " tc/core/polyhedral/schedule_tree.h"
24
25
#include " tc/core/polyhedral/schedule_utils.h"
26
+ #include " tc/core/polyhedral/scop.h"
25
27
26
28
namespace tc {
27
29
namespace polyhedral {
@@ -95,11 +97,11 @@ size_t maxValue(const Scop& scop, const MappingIdType& id) {
95
97
* by the tightened, actual, launch bounds used in practice.
96
98
*/
97
99
template <typename MappingIdType, typename Size>
98
- Size launchBounds (const Scop& scop , Size size) {
100
+ Size launchBounds (const MappedScop& mscop , Size size) {
99
101
Size tightened;
100
102
101
103
for (size_t i = 0 ; i < size.view .size (); ++i) {
102
- tightened.view [i] = maxValue (scop, MappingIdType::makeId (i));
104
+ tightened.view [i] = maxValue (mscop. scop () , MappingIdType::makeId (i));
103
105
}
104
106
105
107
return tightened;
@@ -111,12 +113,12 @@ Size launchBounds(const Scop& scop, Size size) {
111
113
// computes the tightened, actual, launch bounds used in practice after
112
114
// specialization of the ScheduleTree.
113
115
std::pair<tc::Grid, tc::Block> tightenLaunchBounds (
114
- const Scop& scop ,
116
+ const MappedScop& mscop ,
115
117
const tc::Grid& grid,
116
118
const tc::Block& block) {
117
119
return std::make_pair (
118
- launchBounds<mapping::BlockId>(scop , grid),
119
- launchBounds<mapping::ThreadId>(scop , block));
120
+ launchBounds<mapping::BlockId>(mscop , grid),
121
+ launchBounds<mapping::ThreadId>(mscop , block));
120
122
}
121
123
} // namespace polyhedral
122
124
} // namespace tc
0 commit comments