mirror of
https://github.com/boostorg/qvm.git
synced 2026-01-19 04:22:16 +00:00
Issue 44
This commit is contained in:
39
.github/workflows/ci.yml
vendored
39
.github/workflows/ci.yml
vendored
@@ -66,6 +66,12 @@ jobs:
|
||||
os: ubuntu-22.04
|
||||
install: g++-12-multilib
|
||||
address-model: 32,64
|
||||
- toolset: gcc-13
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:23.04
|
||||
install: g++-13-multilib
|
||||
address-model: 32,64
|
||||
- toolset: clang
|
||||
compiler: clang++-3.9
|
||||
cxxstd: "03,11,14"
|
||||
@@ -126,9 +132,26 @@ jobs:
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: ubuntu-22.04
|
||||
install: clang-14
|
||||
- toolset: clang
|
||||
compiler: clang++-15
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: ubuntu-22.04
|
||||
install: clang-15
|
||||
- toolset: clang
|
||||
compiler: clang++-16
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:23.04
|
||||
install: clang-16
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: macos-11
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: macos-12
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: macos-13
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
container: ${{matrix.container}}
|
||||
@@ -144,11 +167,13 @@ jobs:
|
||||
if: matrix.container
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -y install sudo python git g++
|
||||
apt-get -y install sudo python3 git g++
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
run: sudo apt-get -y install ${{matrix.install}}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install ${{matrix.install}}
|
||||
|
||||
- name: Setup Boost
|
||||
run: |
|
||||
@@ -168,7 +193,7 @@ jobs:
|
||||
cd boost-root
|
||||
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||
git submodule update --init tools/boostdep
|
||||
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||
python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||
./bootstrap.sh
|
||||
./b2 -d0 headers
|
||||
|
||||
@@ -180,8 +205,8 @@ jobs:
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cd ../boost-root/libs/qvm
|
||||
python gen/generate_single_header.py -i include/boost/qvm/all.hpp -p include -o test/qvm.hpp boost/qvm
|
||||
python gen/generate_single_header.py -i include/boost/qvm/lite.hpp -p include -o test/qvm_lite.hpp boost/qvm
|
||||
python3 gen/generate_single_header.py -i include/boost/qvm/all.hpp -p include -o test/qvm.hpp boost/qvm
|
||||
python3 gen/generate_single_header.py -i include/boost/qvm/lite.hpp -p include -o test/qvm_lite.hpp boost/qvm
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
@@ -244,8 +269,8 @@ jobs:
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cd ..\boost-root\libs\qvm
|
||||
python gen/generate_single_header.py -i include/boost/qvm/all.hpp -p include -o test/qvm.hpp boost/qvm
|
||||
python gen/generate_single_header.py -i include/boost/qvm/lite.hpp -p include -o test/qvm_lite.hpp boost/qvm
|
||||
python3 gen/generate_single_header.py -i include/boost/qvm/all.hpp -p include -o test/qvm.hpp boost/qvm
|
||||
python3 gen/generate_single_header.py -i include/boost/qvm/lite.hpp -p include -o test/qvm_lite.hpp boost/qvm
|
||||
|
||||
- name: Run tests
|
||||
shell: cmd
|
||||
|
||||
@@ -344,7 +344,7 @@ vec_traits<qvm_detail::sws_<OriginalScalar,SwizzleList> >
|
||||
BOOST_QVM_STATIC_ASSERT(I>=0);
|
||||
BOOST_QVM_STATIC_ASSERT(I<dim);
|
||||
int const idx=qvm_detail::swizzle<SwizzleList,I>::value;
|
||||
BOOST_QVM_STATIC_ASSERT(idx==0);
|
||||
BOOST_QVM_STATIC_ASSERT(idx<1);
|
||||
return reinterpret_cast<OriginalScalar &>(x);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,10 +12,13 @@
|
||||
# include <boost/qvm/vec_operations.hpp>
|
||||
# include <boost/qvm/vec_access.hpp>
|
||||
# include <boost/qvm/vec.hpp>
|
||||
# include <boost/qvm/mat.hpp>
|
||||
# include <boost/qvm/map_vec_mat.hpp>
|
||||
# include <boost/qvm/swizzle.hpp>
|
||||
#endif
|
||||
|
||||
#include "test_qvm_vector.hpp"
|
||||
#include "test_qvm_matrix.hpp"
|
||||
|
||||
int
|
||||
main()
|
||||
@@ -108,5 +111,15 @@ main()
|
||||
BOOST_TEST(v.a[0]==1);
|
||||
BOOST_TEST(v.a[1]==1);
|
||||
}
|
||||
{
|
||||
test_qvm::matrix<V1,2,2> v = diag_mat(_0X(1));
|
||||
BOOST_TEST(v.a[0][0] == 0);
|
||||
BOOST_TEST(v.a[1][1] == 1);
|
||||
}
|
||||
{
|
||||
test_qvm::matrix<V1,2,2> v = diag_mat(X0(1));
|
||||
BOOST_TEST(v.a[0][0] == 1);
|
||||
BOOST_TEST(v.a[1][1] == 0);
|
||||
}
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user