Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jul 2016 22:25:27 +0000 (UTC)
From:      Shaun Amott <shaun@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r418562 - in head/devel: . libflatarray libflatarray/files
Message-ID:  <201607142225.u6EMPRi7020172@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: shaun
Date: Thu Jul 14 22:25:27 2016
New Revision: 418562
URL: https://svnweb.freebsd.org/changeset/ports/418562

Log:
  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

Added:
  head/devel/libflatarray/
  head/devel/libflatarray/Makefile   (contents, props changed)
  head/devel/libflatarray/distinfo   (contents, props changed)
  head/devel/libflatarray/files/
  head/devel/libflatarray/files/patch-examples_performance__tests_main.cpp   (contents, props changed)
  head/devel/libflatarray/files/patch-src_aligned__allocator.hpp   (contents, props changed)
  head/devel/libflatarray/pkg-descr   (contents, props changed)
  head/devel/libflatarray/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Thu Jul 14 20:47:55 2016	(r418561)
+++ head/devel/Makefile	Thu Jul 14 22:25:27 2016	(r418562)
@@ -1210,6 +1210,7 @@
     SUBDIR += libfastjson
     SUBDIR += libffi
     SUBDIR += libfirm
+    SUBDIR += libflatarray
     SUBDIR += libfortuna
     SUBDIR += libfreefare
     SUBDIR += libfsntfs

Added: head/devel/libflatarray/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libflatarray/Makefile	Thu Jul 14 22:25:27 2016	(r418562)
@@ -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>

Added: head/devel/libflatarray/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libflatarray/distinfo	Thu Jul 14 22:25:27 2016	(r418562)
@@ -0,0 +1,2 @@
+SHA256 (libflatarray-0.2.0.tar.gz) = 6ab2aee30e4bd0c8eed876e68c8865c6b981e22481a870154d60e1c520ed9203
+SIZE (libflatarray-0.2.0.tar.gz) = 41804

Added: head/devel/libflatarray/files/patch-examples_performance__tests_main.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libflatarray/files/patch-examples_performance__tests_main.cpp	Thu Jul 14 22:25:27 2016	(r418562)
@@ -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();
+ 

Added: head/devel/libflatarray/files/patch-src_aligned__allocator.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libflatarray/files/patch-src_aligned__allocator.hpp	Thu Jul 14 22:25:27 2016	(r418562)
@@ -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 {

Added: head/devel/libflatarray/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libflatarray/pkg-descr	Thu Jul 14 22:25:27 2016	(r418562)
@@ -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

Added: head/devel/libflatarray/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libflatarray/pkg-plist	Thu Jul 14 22:25:27 2016	(r418562)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607142225.u6EMPRi7020172>