Skip to content

Commit

Permalink
Fixup using declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Jan 19, 2024
1 parent f9f3c6e commit 3d33665
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions core/src/OpenACC/Kokkos_OpenACCSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@ void *Kokkos::Experimental::OpenACCSpace::impl_allocate(

if (!ptr) {
size_t alignment = 1; // OpenACC does not handle alignment
using Kokkos::Experimental::RawMemoryAllocationFailure::FailureMode;
auto failure_mode = arg_alloc_size > 0 ? FailureMode::OutOfMemoryError
: FailureMode::InvalidAllocationSize;
using Kokkos::Experimental::RawMemoryAllocationFailure::AllocationMechanism;
auto alloc_mechanism = AllocationMechanism::OpenACCMalloc;
throw Kokkos::Experimental::RawMemoryAllocationFailure(
arg_alloc_size, alignment, failure_mode, alloc_mechanism);
using Kokkos::Experimental::RawMemoryAllocationFailure;
auto failure_mode =
arg_alloc_size > 0
? RawMemoryAllocationFailure::FailureMode::OutOfMemoryError
: RawMemoryAllocationFailure::FailureMode::InvalidAllocationSize;
auto alloc_mechanism =
RawMemoryAllocationFailure::AllocationMechanism::OpenACCMalloc;
throw RawMemoryAllocationFailure(arg_alloc_size, alignment, failure_mode,
alloc_mechanism);
}

if (Kokkos::Profiling::profileLibraryLoaded()) {
Expand Down

0 comments on commit 3d33665

Please sign in to comment.