Skip to content

Commit 8c9d99e

Browse files
committed
Small fixes
1 parent e47c8ed commit 8c9d99e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

offload/liboffload/src/OffloadImpl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Error olGetDeviceInfoImplDetail(ol_device_handle_t Device,
228228
ReturnHelper ReturnValue(PropSize, PropValue, PropSizeRet);
229229

230230
// Find the info if it exists under any of the given names
231-
auto FindInfo = [&](InfoQueueTy &DevInfo, std::vector<std::string> &Names)
231+
auto FindInfo = [&](InfoQueueTy &DevInfo, llvm::SmallVector<StringRef> &Names)
232232
-> std::optional<decltype(DevInfo.getQueue().begin())> {
233233
if (!Device->Device)
234234
return std::nullopt;
@@ -250,7 +250,7 @@ Error olGetDeviceInfoImplDetail(ol_device_handle_t Device,
250250

251251
return std::nullopt;
252252
};
253-
auto GetInfoString = [&](std::vector<std::string> Names) {
253+
auto GetInfoString = [&](llvm::SmallVector<StringRef> Names) {
254254
InfoQueueTy DevInfo;
255255

256256
if (auto Item = FindInfo(DevInfo, Names)) {
@@ -259,7 +259,7 @@ Error olGetDeviceInfoImplDetail(ol_device_handle_t Device,
259259
return "";
260260
}
261261
};
262-
auto GetInfoXyz = [&](std::vector<std::string> Names) {
262+
auto GetInfoXyz = [&](llvm::SmallVector<StringRef> Names) {
263263
InfoQueueTy DevInfo;
264264

265265
if (auto Item = FindInfo(DevInfo, Names)) {

offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ TEST_P(olGetDeviceInfoTest, SuccessMaxWorkGroupSize) {
8181
ol_dimensions_t Value{0, 0, 0};
8282
ASSERT_SUCCESS(olGetDeviceInfo(Device, OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE,
8383
sizeof(Value), &Value));
84-
ASSERT_GT(Value.x, 0);
85-
ASSERT_GT(Value.y, 0);
86-
ASSERT_GT(Value.z, 0);
84+
ASSERT_GT(Value.x, 0u);
85+
ASSERT_GT(Value.y, 0u);
86+
ASSERT_GT(Value.z, 0u);
8787
}
8888

8989
TEST_P(olGetDeviceInfoTest, InvalidNullHandleDevice) {

0 commit comments

Comments
 (0)