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

Add clang to CI #157

Merged
merged 2 commits into from
Mar 3, 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
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,40 @@ jobs:
- name: run tests
run: build/tests

build-ubuntu-clang10:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install boost
run: |
sudo apt install libboost-all-dev
- name: vcpkg install dependencies
run: |
vcpkg install catch2 fmt
- name: install alpaka
run: |
git clone https://github.com/alpaka-group/alpaka.git
mkdir alpaka/build
cd alpaka/build
cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake
sudo cmake --build . --target install
- name: install Vc
run: |
git clone https://github.com/VcDevel/Vc.git
mkdir Vc/build
cd Vc/build
cmake .. -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake
sudo cmake --build . --target install
- name: cmake
run: |
mkdir build
cd build
CXX=clang++-10 cmake .. -DCMAKE_BUILD_TYPE=$CONFIG -DASAN_FOR_TESTS=ON -DALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE=ON -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: build tests + examples
run: cmake --build build -j $THREADS
- name: run tests
run: build/tests

build-windows:
runs-on: windows-latest
env:
Expand Down
28 changes: 14 additions & 14 deletions examples/viewcopy/viewcopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ void aosoa_copy(
BlobType2>& dstView,
Ex ex = {})
{
static_assert(srcView.storageBlobs.rank == 1);
static_assert(dstView.storageBlobs.rank == 1);
static_assert(decltype(srcView.storageBlobs)::rank == 1);
static_assert(decltype(dstView.storageBlobs)::rank == 1);

if (srcView.mapping.arrayDomainSize != dstView.mapping.arrayDomainSize)
throw std::runtime_error{"UserDomain sizes are different"};
Expand Down Expand Up @@ -249,13 +249,13 @@ int main(int argc, char** argv)
naive_copy(srcView, dstView, std::execution::par);
});
benchmarkCopy("memcpy", plotFile, srcView, srcHash, dstMapping, [](const auto& srcView, auto& dstView) {
static_assert(srcView.storageBlobs.rank == 1);
static_assert(dstView.storageBlobs.rank == 1);
static_assert(decltype(srcView.storageBlobs)::rank == 1);
static_assert(decltype(dstView.storageBlobs)::rank == 1);
std::memcpy(dstView.storageBlobs[0].data(), srcView.storageBlobs[0].data(), dstView.storageBlobs[0].size());
});
benchmarkCopy("memcpy(p)", plotFile, srcView, srcHash, dstMapping, [](const auto& srcView, auto& dstView) {
static_assert(srcView.storageBlobs.rank == 1);
static_assert(dstView.storageBlobs.rank == 1);
static_assert(decltype(srcView.storageBlobs)::rank == 1);
static_assert(decltype(dstView.storageBlobs)::rank == 1);
parallel_memcpy(
dstView.storageBlobs[0].data(),
srcView.storageBlobs[0].data(),
Expand All @@ -282,13 +282,13 @@ int main(int argc, char** argv)
naive_copy(srcView, dstView, std::execution::par);
});
benchmarkCopy("memcpy", plotFile, srcView, srcHash, dstMapping, [](const auto& srcView, auto& dstView) {
static_assert(srcView.storageBlobs.rank == 1);
static_assert(dstView.storageBlobs.rank == 1);
static_assert(decltype(srcView.storageBlobs)::rank == 1);
static_assert(decltype(dstView.storageBlobs)::rank == 1);
std::memcpy(dstView.storageBlobs[0].data(), srcView.storageBlobs[0].data(), dstView.storageBlobs[0].size());
});
benchmarkCopy("memcpy(p)", plotFile, srcView, srcHash, dstMapping, [](const auto& srcView, auto& dstView) {
static_assert(srcView.storageBlobs.rank == 1);
static_assert(dstView.storageBlobs.rank == 1);
static_assert(decltype(srcView.storageBlobs)::rank == 1);
static_assert(decltype(dstView.storageBlobs)::rank == 1);
parallel_memcpy(
dstView.storageBlobs[0].data(),
srcView.storageBlobs[0].data(),
Expand Down Expand Up @@ -323,13 +323,13 @@ int main(int argc, char** argv)
naive_copy(srcView, dstView, std::execution::par);
});
benchmarkCopy("memcpy", plotFile, srcView, srcHash, dstMapping, [](const auto& srcView, auto& dstView) {
static_assert(srcView.storageBlobs.rank == 1);
static_assert(dstView.storageBlobs.rank == 1);
static_assert(decltype(srcView.storageBlobs)::rank == 1);
static_assert(decltype(dstView.storageBlobs)::rank == 1);
std::memcpy(dstView.storageBlobs[0].data(), srcView.storageBlobs[0].data(), dstView.storageBlobs[0].size());
});
benchmarkCopy("memcpy(p)", plotFile, srcView, srcHash, dstMapping, [](const auto& srcView, auto& dstView) {
static_assert(srcView.storageBlobs.rank == 1);
static_assert(dstView.storageBlobs.rank == 1);
static_assert(decltype(srcView.storageBlobs)::rank == 1);
static_assert(decltype(dstView.storageBlobs)::rank == 1);
parallel_memcpy(
dstView.storageBlobs[0].data(),
srcView.storageBlobs[0].data(),
Expand Down