xsimd 6.1.5 (new formula)
Closes #30902. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
parent
dd6dab501f
commit
2af2783ae4
1 changed files with 45 additions and 0 deletions
45
Formula/xsimd.rb
Normal file
45
Formula/xsimd.rb
Normal file
|
@ -0,0 +1,45 @@
|
|||
class Xsimd < Formula
|
||||
desc "Modern, portable C++ wrappers for SIMD intrinsics"
|
||||
homepage "https://xsimd.readthedocs.io/en/latest/"
|
||||
url "https://github.com/QuantStack/xsimd/archive/6.1.5.tar.gz"
|
||||
sha256 "ecc781520f7b2bfdeb51d1385683694f2e89be1a05b77b222b9783cfeb645034"
|
||||
|
||||
depends_on "cmake" => :build
|
||||
|
||||
def install
|
||||
args = std_cmake_args
|
||||
args << "-DBUILD_TESTS=OFF"
|
||||
|
||||
system "cmake", ".", *args
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<~EOS
|
||||
#include <vector>
|
||||
#include <type_traits>
|
||||
|
||||
#include "xsimd/memory/xsimd_alignment.hpp"
|
||||
|
||||
using namespace xsimd;
|
||||
|
||||
struct mock_container {};
|
||||
|
||||
int main(void) {
|
||||
using u_vector_type = std::vector<double>;
|
||||
using a_vector_type = std::vector<double, aligned_allocator<double, XSIMD_DEFAULT_ALIGNMENT>>;
|
||||
|
||||
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();
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system ENV.cxx, "test.c", "-std=c++14", "-I#{include}", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue