Skip to content

Commit e9dccd6

Browse files
committed
Applies git-clang-format
1 parent 108e4b9 commit e9dccd6

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

offload/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,18 +3033,20 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
30333033

30343034
hsa_agent_t *Agents = nullptr;
30353035
uint32_t Count = 0;
3036-
hsa_status_t Status = hsa_amd_pointer_info(Ptr, &Info, malloc, &Count, &Agents);
3037-
3036+
hsa_status_t Status =
3037+
hsa_amd_pointer_info(Ptr, &Info, malloc, &Count, &Agents);
3038+
30383039
if (Status != HSA_STATUS_SUCCESS)
30393040
return false;
30403041

30413042
// Checks if the pointer is known by HSA and accessible by the device
3042-
for(uint32_t i = 0; i < Count; i++)
3043-
if(Agents[i].handle == getAgent().handle)
3043+
for (uint32_t i = 0; i < Count; i++)
3044+
if (Agents[i].handle == getAgent().handle)
30443045
return Info.sizeInBytes >= Size;
30453046

30463047
// If the pointer is unknown to HSA it's assumed a host pointer
3047-
// in that case the device can access it on unified memory support is enabled
3048+
// in that case the device can access it on unified memory support is
3049+
// enabled
30483050
return IsXnackEnabled;
30493051
}
30503052

offload/plugins-nextgen/common/include/PluginInterface.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,9 @@ struct GenericDeviceTy : public DeviceAllocatorTy {
10961096
/// Returns true if the plugin can guarantee that the associated
10971097
/// storage is accessible
10981098
bool isAccessiblePtr(const void *Ptr, size_t Size);
1099-
virtual bool isAccessiblePtrImpl(const void *Ptr, size_t Size) { return false; }
1099+
virtual bool isAccessiblePtrImpl(const void *Ptr, size_t Size) {
1100+
return false;
1101+
}
11001102

11011103
virtual Expected<omp_interop_val_t *>
11021104
createInterop(int32_t InteropType, interop_spec_t &InteropSpec) {

offload/plugins-nextgen/common/src/PluginInterface.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,9 @@ Error GenericDeviceTy::syncEvent(void *EventPtr) {
16071607

16081608
bool GenericDeviceTy::useAutoZeroCopy() { return useAutoZeroCopyImpl(); }
16091609

1610-
bool GenericDeviceTy::isAccessiblePtr(const void *Ptr, size_t Size) { return isAccessiblePtrImpl(Ptr, Size); }
1610+
bool GenericDeviceTy::isAccessiblePtr(const void *Ptr, size_t Size) {
1611+
return isAccessiblePtrImpl(Ptr, Size);
1612+
}
16111613

16121614
Error GenericPluginTy::init() {
16131615
if (Initialized)
@@ -2161,7 +2163,8 @@ int32_t GenericPluginTy::use_auto_zero_copy(int32_t DeviceId) {
21612163
return getDevice(DeviceId).useAutoZeroCopy();
21622164
}
21632165

2164-
int32_t GenericPluginTy::is_accessible_ptr(int32_t DeviceId, const void *Ptr, size_t Size) {
2166+
int32_t GenericPluginTy::is_accessible_ptr(int32_t DeviceId, const void *Ptr,
2167+
size_t Size) {
21652168
return getDevice(DeviceId).isAccessiblePtr(Ptr, Size);
21662169
}
21672170

0 commit comments

Comments
 (0)