Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build for VS 16.11 #338

Merged
merged 1 commit into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ if (BUILD_TESTING)
file(GLOB_RECURSE testSources "${CMAKE_CURRENT_SOURCE_DIR}/tests/**")
add_executable(tests ${testSources})
source_group(TREE "${CMAKE_CURRENT_LIST_DIR}/tests" FILES ${testSources})
target_compile_features(tests PRIVATE cxx_std_20)
if (MSVC)
target_compile_options(tests PRIVATE /std:c++latest) # C++20 does not include ranges yet in MSVC, because the ABI is not finalized
target_compile_options(tests PRIVATE /permissive- /constexpr:steps10000000 /diagnostics:caret)
else()
target_compile_features(tests PRIVATE cxx_std_20)
endif()
target_link_libraries(tests PRIVATE Catch2::Catch2 llama::llama)

Expand Down
6 changes: 3 additions & 3 deletions include/llama/Copy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ namespace llama
using RecordDim = typename SrcMapping::RecordDim;
internal::assertTrivialCopyable<RecordDim>();

constexpr bool MBSrc = SrcMapping::blobCount > 1;
constexpr bool MBDst = DstMapping::blobCount > 1;
static constexpr bool MBSrc = SrcMapping::blobCount > 1;
static constexpr bool MBDst = DstMapping::blobCount > 1;
static constexpr auto LanesSrc = internal::aosoaLanes<SrcMapping>;
static constexpr auto LanesDst = internal::aosoaLanes<DstMapping>;

Expand Down Expand Up @@ -214,7 +214,7 @@ namespace llama
}
};

constexpr auto L = []
static constexpr auto L = []
{
if constexpr(srcIsAoSoA && dstIsAoSoA)
return std::gcd(LanesSrc, LanesDst);
Expand Down