Skip to content

Commit

Permalink
Workaround nvcc not finding ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed May 10, 2023
1 parent 30ec7f9 commit 9d0d3a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions include/llama/mapping/AoSoA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ namespace llama::mapping
using Flattener = FlattenRecordDim<TRecordDim>;
inline static constexpr std::size_t blobCount = 1;

#if defined(__NVCC__) && __CUDACC_VER_MAJOR__ >= 12
using Base::Base;
#else
constexpr AoSoA() = default;

LLAMA_FN_HOST_ACC_INLINE constexpr explicit AoSoA(TArrayExtents extents, TRecordDim = {}) : Base(extents)
{
}
#endif

LLAMA_FN_HOST_ACC_INLINE constexpr auto blobSize(size_type) const -> size_type
{
Expand Down
2 changes: 1 addition & 1 deletion include/llama/mapping/SoA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace llama::mapping
inline static constexpr std::size_t blobCount
= blobs == Blobs::OnePerField ? mp_size<FlatRecordDim<TRecordDim>>::value : 1;

#ifndef __NVCC__
#if defined(__NVCC__) && __CUDACC_VER_MAJOR__ >= 12
using Base::Base;
#else
constexpr SoA() = default;
Expand Down

0 comments on commit 9d0d3a7

Please sign in to comment.