aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorshaun <shaun@FreeBSD.org>2016-07-15 06:25:27 +0800
committershaun <shaun@FreeBSD.org>2016-07-15 06:25:27 +0800
commita09c7b16c7d02ca124f2baf7a7ee7cf90f4eadc4 (patch)
tree577c065b7c7239f82b74805cfd07630201a004b7 /devel
parent81360c58d01183d4f14c14fd6111bda937f8351f (diff)
downloadfreebsd-ports-gnome-a09c7b16c7d02ca124f2baf7a7ee7cf90f4eadc4.tar.gz
freebsd-ports-gnome-a09c7b16c7d02ca124f2baf7a7ee7cf90f4eadc4.tar.zst
freebsd-ports-gnome-a09c7b16c7d02ca124f2baf7a7ee7cf90f4eadc4.zip
New port: devel/libflatarray.
LibFlatArray acts as a highly efficient multi-dimensional array of arbitrary objects (array of structs, AoS), but really uses a struct of arrays (SoA) memory layout. It's great for writing vectorized code and its lightning-fast iterators give you access to neighboring elements with zero address generation overhead. PR: ports/208359 Submitted by: kurt@kmk-computers.de
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/libflatarray/Makefile20
-rw-r--r--devel/libflatarray/distinfo2
-rw-r--r--devel/libflatarray/files/patch-examples_performance__tests_main.cpp70
-rw-r--r--devel/libflatarray/files/patch-src_aligned__allocator.hpp16
-rw-r--r--devel/libflatarray/pkg-descr7
-rw-r--r--devel/libflatarray/pkg-plist31
7 files changed, 147 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 98087624f096..fac8f64ca2e1 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1210,6 +1210,7 @@
SUBDIR += libfastjson
SUBDIR += libffi
SUBDIR += libfirm
+ SUBDIR += libflatarray
SUBDIR += libfortuna
SUBDIR += libfreefare
SUBDIR += libfsntfs
diff --git a/devel/libflatarray/Makefile b/devel/libflatarray/Makefile
new file mode 100644
index 000000000000..74768b6492ea
--- /dev/null
+++ b/devel/libflatarray/Makefile
@@ -0,0 +1,20 @@
+# Created by: Kurt Kanzenbach <kurt@kmk-computers.de>
+# $FreeBSD$
+
+PORTNAME= libflatarray
+PORTVERSION= 0.2.0
+CATEGORIES= devel science
+MASTER_SITES= http://www.libgeodecomp.org/archive/
+
+MAINTAINER= kurt@kmk-computers.de
+COMMENT= Struct of arrays library with object oriented interface for C++
+
+LICENSE= BSL
+
+BUILD_DEPENDS= boost-libs>=1.48:${PORTSDIR}/devel/boost-libs
+
+USES= cmake:outsource
+
+CMAKE_ARGS+= -DWITH_CUDA:BOOL=FALSE
+
+.include <bsd.port.mk>
diff --git a/devel/libflatarray/distinfo b/devel/libflatarray/distinfo
new file mode 100644
index 000000000000..c40ba8e86067
--- /dev/null
+++ b/devel/libflatarray/distinfo
@@ -0,0 +1,2 @@
+SHA256 (libflatarray-0.2.0.tar.gz) = 6ab2aee30e4bd0c8eed876e68c8865c6b981e22481a870154d60e1c520ed9203
+SIZE (libflatarray-0.2.0.tar.gz) = 41804
diff --git a/devel/libflatarray/files/patch-examples_performance__tests_main.cpp b/devel/libflatarray/files/patch-examples_performance__tests_main.cpp
new file mode 100644
index 000000000000..ad9d7c24c5ea
--- /dev/null
+++ b/devel/libflatarray/files/patch-examples_performance__tests_main.cpp
@@ -0,0 +1,70 @@
+--- examples/performance_tests/main.cpp.orig 2016-02-02 20:14:50 UTC
++++ examples/performance_tests/main.cpp
+@@ -10,7 +10,14 @@
+ #include <libflatarray/short_vec.hpp>
+ #include <libflatarray/testbed/cpu_benchmark.hpp>
+ #include <libflatarray/testbed/evaluate.hpp>
++
++#ifdef __SSE__
++#include <xmmintrin.h>
++#endif
++
++#ifdef __AVX__
+ #include <immintrin.h>
++#endif
+
+ #define WEIGHT_S 0.11
+ #define WEIGHT_T 0.12
+@@ -118,6 +125,7 @@ private:
+ }
+ };
+
++#ifdef __SSE__
+ class JacobiD3Q7Pepper : public JacobiD3Q7
+ {
+ public:
+@@ -292,6 +300,7 @@ private:
+ }
+ }
+ };
++#endif
+
+ class JacobiCell
+ {
+@@ -416,6 +425,7 @@ private:
+ }
+ };
+
++#ifdef __SSE__
+ class JacobiD3Q7Silver : public JacobiD3Q7
+ {
+ public:
+@@ -634,6 +644,7 @@ private:
+ }
+ }
+ };
++#endif
+
+ class Particle
+ {
+@@ -1477,7 +1488,7 @@ int main(int argc, char **argv)
+ eval(JacobiD3Q7Vanilla(), *i);
+ }
+
+-#ifdef __AVX__
++#ifdef __SSE__
+ for (std::vector<std::vector<int> >::iterator i = sizes.begin(); i != sizes.end(); ++i) {
+ eval(JacobiD3Q7Pepper(), *i);
+ }
+@@ -1487,9 +1498,11 @@ int main(int argc, char **argv)
+ eval(JacobiD3Q7Bronze(), *i);
+ }
+
++#ifdef __SSE__
+ for (std::vector<std::vector<int> >::iterator i = sizes.begin(); i != sizes.end(); ++i) {
+ eval(JacobiD3Q7Silver(), *i);
+ }
++#endif
+
+ sizes.clear();
+
diff --git a/devel/libflatarray/files/patch-src_aligned__allocator.hpp b/devel/libflatarray/files/patch-src_aligned__allocator.hpp
new file mode 100644
index 000000000000..2b45b48102b3
--- /dev/null
+++ b/devel/libflatarray/files/patch-src_aligned__allocator.hpp
@@ -0,0 +1,16 @@
+--- src/aligned_allocator.hpp.orig 2014-10-28 09:12:31 UTC
++++ src/aligned_allocator.hpp
+@@ -8,13 +8,7 @@
+ #ifndef FLAT_ARRAY_ALIGNED_ALLOCATOR_HPP
+ #define FLAT_ARRAY_ALIGNED_ALLOCATOR_HPP
+
+-#ifdef __APPLE__
+ #include <cstddef>
+-#include <stdlib.h>
+-#else
+-#include <malloc.h>
+-#endif
+-
+ #include <memory>
+
+ namespace LibFlatArray {
diff --git a/devel/libflatarray/pkg-descr b/devel/libflatarray/pkg-descr
new file mode 100644
index 000000000000..aaaeff9725a7
--- /dev/null
+++ b/devel/libflatarray/pkg-descr
@@ -0,0 +1,7 @@
+LibFlatArray acts as a highly efficient multi-dimensional array of
+arbitrary objects (array of structs, AoS), but really uses a struct of
+arrays (SoA) memory layout. It's great for writing vectorized code and
+its lightning-fast iterators give you access to neighboring elements
+with zero address generation overhead.
+
+WWW: http://www.libgeodecomp.org/libflatarray.html
diff --git a/devel/libflatarray/pkg-plist b/devel/libflatarray/pkg-plist
new file mode 100644
index 000000000000..eea9575f76e8
--- /dev/null
+++ b/devel/libflatarray/pkg-plist
@@ -0,0 +1,31 @@
+include/libflatarray/aggregated_member_size.hpp
+include/libflatarray/aligned_allocator.hpp
+include/libflatarray/api_traits.hpp
+include/libflatarray/coord.hpp
+include/libflatarray/cuda_allocator.hpp
+include/libflatarray/detail/dual_callback_helper.hpp
+include/libflatarray/detail/get_set_instance_functor.hpp
+include/libflatarray/detail/load_save_functor.hpp
+include/libflatarray/detail/macros.hpp
+include/libflatarray/detail/offset.hpp
+include/libflatarray/detail/set_byte_size_functor.hpp
+include/libflatarray/detail/short_vec_avx_float_8.hpp
+include/libflatarray/detail/short_vec_qpx_double_4.hpp
+include/libflatarray/detail/short_vec_sse_double_8.hpp
+include/libflatarray/detail/short_vec_sse_float_16.hpp
+include/libflatarray/detail/short_vec_sse_float_8.hpp
+include/libflatarray/detail/sqrt_reference.hpp
+include/libflatarray/flat_array.hpp
+include/libflatarray/macros.hpp
+include/libflatarray/member_ptr_to_offset.hpp
+include/libflatarray/number_of_members.hpp
+include/libflatarray/short_vec.hpp
+include/libflatarray/soa_accessor.hpp
+include/libflatarray/soa_array.hpp
+include/libflatarray/soa_grid.hpp
+include/libflatarray/testbed/benchmark.hpp
+include/libflatarray/testbed/cpu_benchmark.hpp
+include/libflatarray/testbed/evaluate.hpp
+include/libflatarray/testbed/gpu_benchmark.hpp
+lib/cmake/libflatarray/libflatarrayConfig.cmake
+lib/cmake/libflatarray/libflatarrayConfigVersion.cmake