|
|
@ -7,6 +7,7 @@ package("xsimd") |
|
|
|
add_urls("https://github.com/xtensor-stack/xsimd/archive/refs/tags/$(version).tar.gz", |
|
|
|
add_urls("https://github.com/xtensor-stack/xsimd/archive/refs/tags/$(version).tar.gz", |
|
|
|
"https://github.com/xtensor-stack/xsimd.git") |
|
|
|
"https://github.com/xtensor-stack/xsimd.git") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_versions("12.1.1", "73f94a051278ef3da4533b691d31244d12074d5d71107473a9fd8d7be15f0110") |
|
|
|
add_versions("7.6.0", "eaf47f1a316ef6c3287b266161eeafc5aa61226ce5ac6c13502546435b790252") |
|
|
|
add_versions("7.6.0", "eaf47f1a316ef6c3287b266161eeafc5aa61226ce5ac6c13502546435b790252") |
|
|
|
add_versions("8.0.3", "d1d41253c4f82eaf2f369d7fcb4142e35076cf8675b9d94caa06ecf883024344") |
|
|
|
add_versions("8.0.3", "d1d41253c4f82eaf2f369d7fcb4142e35076cf8675b9d94caa06ecf883024344") |
|
|
|
add_versions("8.0.5", "0e1b5d973b63009f06a3885931a37452580dbc8d7ca8ad40d4b8c80d2a0f84d7") |
|
|
|
add_versions("8.0.5", "0e1b5d973b63009f06a3885931a37452580dbc8d7ca8ad40d4b8c80d2a0f84d7") |
|
|
@ -28,14 +29,28 @@ package("xsimd") |
|
|
|
on_test(function (package) |
|
|
|
on_test(function (package) |
|
|
|
if package:version():ge("8.0") then |
|
|
|
if package:version():ge("8.0") then |
|
|
|
assert(package:check_cxxsnippets({test = [[ |
|
|
|
assert(package:check_cxxsnippets({test = [[ |
|
|
|
#include <iostream> |
|
|
|
#include <type_traits> |
|
|
|
|
|
|
|
#include <vector> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "xsimd/memory/xsimd_alignment.hpp" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using namespace xsimd; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct mock_container {}; |
|
|
|
|
|
|
|
|
|
|
|
void test() { |
|
|
|
void test() { |
|
|
|
xsimd::batch<double, xsimd::avx> a{1.5, 2.5, 3.5, 4.5}; |
|
|
|
using u_vector_type = std::vector<double>; |
|
|
|
xsimd::batch<double, xsimd::avx> b{2.5, 3.5, 4.5, 5.5}; |
|
|
|
using a_vector_type = std::vector<double, xsimd::default_allocator<double>>; |
|
|
|
auto mean = (a + b) / 2; |
|
|
|
|
|
|
|
std::cout << mean << std::endl; |
|
|
|
using u_vector_align = container_alignment_t<u_vector_type>; |
|
|
|
|
|
|
|
using a_vector_align = container_alignment_t<a_vector_type>; |
|
|
|
|
|
|
|
using mock_align = container_alignment_t<mock_container>; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!std::is_same<u_vector_align, unaligned_mode>::value) abort(); |
|
|
|
|
|
|
|
if (!std::is_same<a_vector_align, aligned_mode>::value) abort(); |
|
|
|
|
|
|
|
if (!std::is_same<mock_align, unaligned_mode>::value) abort(); |
|
|
|
} |
|
|
|
} |
|
|
|
]]}, {configs = {languages = "c++14"}, includes = "xsimd/xsimd.hpp"})) |
|
|
|
]]}, {configs = {languages = "c++14"}})) |
|
|
|
else |
|
|
|
else |
|
|
|
assert(package:check_cxxsnippets({test = [[ |
|
|
|
assert(package:check_cxxsnippets({test = [[ |
|
|
|
#include <iostream> |
|
|
|
#include <iostream> |
|
|
|