File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,9 @@ class device_image_impl {
191
191
MBinImage->getSpecConstants ();
192
192
using SCItTy = pi::DeviceBinaryImage::PropertyRange::ConstIterator;
193
193
194
+ // This variable is used to calculate spec constant value offset in a
195
+ // flat byte array.
196
+ unsigned BlobOffset = 0 ;
194
197
for (SCItTy SCIt : SCRange) {
195
198
const char *SCName = (*SCIt)->Name ;
196
199
@@ -211,7 +214,6 @@ class device_image_impl {
211
214
auto *It = reinterpret_cast <const std::uint32_t *>(&Descriptors[8 ]);
212
215
auto *End = reinterpret_cast <const std::uint32_t *>(&Descriptors[0 ] +
213
216
Descriptors.size ());
214
- unsigned BlobOffset = 0 ;
215
217
while (It != End) {
216
218
// The map is not locked here because updateSpecConstSymMap() is only
217
219
// supposed to be called from c'tor.
@@ -221,8 +223,8 @@ class device_image_impl {
221
223
BlobOffset += /* Size*/ It[2 ];
222
224
It += NumElements;
223
225
}
224
- MSpecConstsBlob.resize (BlobOffset);
225
226
}
227
+ MSpecConstsBlob.resize (BlobOffset);
226
228
}
227
229
}
228
230
You can’t perform that action at this time.
0 commit comments