Skip to content

Commit

Permalink
[HETEROGENEOUS] Changes suggested by new llvm18 clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Sep 5, 2024
1 parent 15ea9bb commit d6ea821
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {

class AlpakaBackendProducer : public global::EDProducer<> {
public:
AlpakaBackendProducer(edm::ParameterSet const& config){};
AlpakaBackendProducer(edm::ParameterSet const& config) {}

void produce(edm::StreamID sid, device::Event& event, device::EventSetup const&) const override {}

Expand Down
15 changes: 9 additions & 6 deletions HeterogeneousCore/AlpakaInterface/interface/CachedBufAlloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ namespace cms::alpakatools {
template <typename TElem, typename TDim, typename TIdx, typename TQueue>
struct CachedBufAlloc<TElem, TDim, TIdx, alpaka::DevCpu, TQueue, void> {
template <typename TExtent>
ALPAKA_FN_HOST static auto allocCachedBuf(alpaka::DevCpu const& dev, TQueue queue, TExtent const& extent)
-> alpaka::BufCpu<TElem, TDim, TIdx> {
ALPAKA_FN_HOST static auto allocCachedBuf(alpaka::DevCpu const& dev,
TQueue queue,
TExtent const& extent) -> alpaka::BufCpu<TElem, TDim, TIdx> {
// non-cached, queue-ordered asynchronous host-only memory
return alpaka::allocAsyncBuf<TElem, TIdx>(queue, extent);
}
Expand Down Expand Up @@ -85,8 +86,9 @@ namespace cms::alpakatools {
template <typename TElem, typename TDim, typename TIdx, typename TQueue>
struct CachedBufAlloc<TElem, TDim, TIdx, alpaka::DevCudaRt, TQueue, void> {
template <typename TExtent>
ALPAKA_FN_HOST static auto allocCachedBuf(alpaka::DevCudaRt const& dev, TQueue queue, TExtent const& extent)
-> alpaka::BufCudaRt<TElem, TDim, TIdx> {
ALPAKA_FN_HOST static auto allocCachedBuf(alpaka::DevCudaRt const& dev,
TQueue queue,
TExtent const& extent) -> alpaka::BufCudaRt<TElem, TDim, TIdx> {
ALPAKA_DEBUG_MINIMAL_LOG_SCOPE;

auto& allocator = getDeviceCachingAllocator<alpaka::DevCudaRt, TQueue>(dev);
Expand Down Expand Up @@ -161,8 +163,9 @@ namespace cms::alpakatools {
template <typename TElem, typename TDim, typename TIdx, typename TQueue>
struct CachedBufAlloc<TElem, TDim, TIdx, alpaka::DevHipRt, TQueue, void> {
template <typename TExtent>
ALPAKA_FN_HOST static auto allocCachedBuf(alpaka::DevHipRt const& dev, TQueue queue, TExtent const& extent)
-> alpaka::BufHipRt<TElem, TDim, TIdx> {
ALPAKA_FN_HOST static auto allocCachedBuf(alpaka::DevHipRt const& dev,
TQueue queue,
TExtent const& extent) -> alpaka::BufHipRt<TElem, TDim, TIdx> {
ALPAKA_DEBUG_MINIMAL_LOG_SCOPE;

auto& allocator = getDeviceCachingAllocator<alpaka::DevHipRt, TQueue>(dev);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ int main() {
alpaka::enqueue(queue, alpaka::createTaskKernel<Acc1D>(workDivMultiBlock, verify(), output1_d.data(), num_items));

alpaka::wait(queue); // input_d and output1_d end of scope
} // ksize
} // ksize
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion HeterogeneousCore/CUDACore/interface/ScopedContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ namespace cms {
})});
}
} // namespace impl
} // namespace cuda
} // namespace cuda
} // namespace cms

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace cms {
struct bounded_array {};
};
} // namespace impl
} // namespace device
} // namespace device

template <typename T>
typename device::impl::make_device_unique_selector<T>::non_array make_device_unique(cudaStream_t stream) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ namespace cms {
struct bounded_array {};
};
} // namespace impl
} // namespace noncached
} // namespace host
} // namespace noncached
} // namespace host

/**
* The difference wrt. make_host_unique is that these
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace cms {
struct bounded_array {};
};
} // namespace impl
} // namespace host
} // namespace host

// Allocate pageable host memory
template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion HeterogeneousCore/SonicTriton/interface/TritonDummyCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace edm {
return new T(iPSet);
}
} // namespace impl
} // namespace stream
} // namespace stream
} // namespace edm

#endif

0 comments on commit d6ea821

Please sign in to comment.