summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-05-31 17:30:06 -0700
committerYuri Victorovich <yuri@FreeBSD.org>2022-05-31 17:30:55 -0700
commit7402f09157404e4947b26e4a55b60a0dda783652 (patch)
tree1d4c04619d88c88b418cfa52e9f398eba638485d /math
parentdevel/universal-ctags: Update to p5.9.20220529.0 (diff)
math/hptt: New port: High-Performance Tensor Transpose library
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/hptt/Makefile26
-rw-r--r--math/hptt/distinfo3
-rw-r--r--math/hptt/files/patch-CMakeLists.txt11
-rw-r--r--math/hptt/files/patch-testframework_Makefile11
-rw-r--r--math/hptt/pkg-descr15
-rw-r--r--math/hptt/pkg-plist8
7 files changed, 75 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index ea4089e86496..be23c4d1417a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -376,6 +376,7 @@
SUBDIR += hmat-oss
SUBDIR += hpcombi
SUBDIR += hpipm
+ SUBDIR += hptt
SUBDIR += hs-Agda
SUBDIR += hs-penrose
SUBDIR += hsl
diff --git a/math/hptt/Makefile b/math/hptt/Makefile
new file mode 100644
index 000000000000..30ff2067adcc
--- /dev/null
+++ b/math/hptt/Makefile
@@ -0,0 +1,26 @@
+PORTNAME= hptt
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.0.5-18
+DISTVERSIONSUFFIX= -g9425386
+CATEGORIES= math
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= High-Performance Tensor Transpose library
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+TEST_DEPENDS= gmake:devel/gmake
+
+USES= cmake:testing compiler:c++11-lang
+USE_GCC= yes # workaround for https://github.com/springer13/hptt/issues/21
+
+USE_GITHUB= yes
+GH_ACCOUNT= springer13
+
+CMAKE_ON= BUILD_SHARED_LIBS
+
+do-test: # tests fail to build, see https://github.com/springer13/hptt/issues/23
+ @cd ${WRKSRC}/testframework && ${SETENV} ${MAKE_ENV} ${GMAKE} FREEBSD_GCC_DEFAULT=${GCC_DEFAULT} all
+
+.include <bsd.port.mk>
diff --git a/math/hptt/distinfo b/math/hptt/distinfo
new file mode 100644
index 000000000000..bcbc1deda3d6
--- /dev/null
+++ b/math/hptt/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1654029691
+SHA256 (springer13-hptt-v1.0.5-18-g9425386_GH0.tar.gz) = 00cc170a88bd7d3b18a02d6750a9475f34b2f1a9b9bf387e373e712282c4d556
+SIZE (springer13-hptt-v1.0.5-18-g9425386_GH0.tar.gz) = 635751
diff --git a/math/hptt/files/patch-CMakeLists.txt b/math/hptt/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..a1194edf89fb
--- /dev/null
+++ b/math/hptt/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2022-05-31 20:45:22 UTC
++++ CMakeLists.txt
+@@ -37,7 +37,7 @@ endif()
+
+ set(HPTT_SRCS src/hptt.cpp src/plan.cpp src/transpose.cpp src/utils.cpp)
+
+-add_library(hptt STATIC ${HPTT_SRCS})
++add_library(hptt ${HPTT_SRCS})
+ target_compile_features(hptt PUBLIC cxx_std_11)
+ target_include_directories(hptt PUBLIC ${PROJECT_SOURCE_DIR}/include)
+ #target_compile_definitions(hptt PRIVATE ${HPTT_CXX_COMPILE_DEFS})
diff --git a/math/hptt/files/patch-testframework_Makefile b/math/hptt/files/patch-testframework_Makefile
new file mode 100644
index 000000000000..cd06e0be8957
--- /dev/null
+++ b/math/hptt/files/patch-testframework_Makefile
@@ -0,0 +1,11 @@
+--- testframework/Makefile.orig 2022-05-31 21:42:42 UTC
++++ testframework/Makefile
+@@ -3,7 +3,7 @@ CXX_FLAGS=-O3 -std=c++11
+ ifeq ($(CXX),icpc)
+ CXX_FLAGS += -qopenmp -xhost
+ else
+-ifeq ($(CXX),g++)
++ifeq ($(CXX),g++$(FREEBSD_GCC_DEFAULT))
+ CXX_FLAGS += -fopenmp -march=native
+ else
+ ifeq ($(CXX),clang++)
diff --git a/math/hptt/pkg-descr b/math/hptt/pkg-descr
new file mode 100644
index 000000000000..268966c4717b
--- /dev/null
+++ b/math/hptt/pkg-descr
@@ -0,0 +1,15 @@
+HPTT is a high-performance C++ library for out-of-place tensor
+transpositions.
+
+Key Features:
+* Multi-threading support
+* Explicit vectorization
+* Auto-tuning (akin to FFTW)
+ * Loop order
+ * Parallelization
+* Multi architecture support
+ * Explicitly vectorized kernels for (AVX and ARM)
+* Supports float, double, complex and double complex data types
+* Supports both column-major and row-major data layouts
+
+WWW: https://github.com/springer13/hptt
diff --git a/math/hptt/pkg-plist b/math/hptt/pkg-plist
new file mode 100644
index 000000000000..5a82767e0548
--- /dev/null
+++ b/math/hptt/pkg-plist
@@ -0,0 +1,8 @@
+include/compute_node.h
+include/hptt.h
+include/hptt_types.h
+include/macros.h
+include/plan.h
+include/transpose.h
+include/utils.h
+lib/libhptt.so