diff options
author | bf <bf@FreeBSD.org> | 2012-01-06 05:15:43 +0800 |
---|---|---|
committer | bf <bf@FreeBSD.org> | 2012-01-06 05:15:43 +0800 |
commit | 99b84901a594862a07842f364d6d209211c52106 (patch) | |
tree | 1293115313506035a1980f335afa84e201776b41 /math/spblas | |
parent | be6dbe8c6b6c28095b3ac06ae4de14878d3f719b (diff) | |
download | freebsd-ports-gnome-99b84901a594862a07842f364d6d209211c52106.tar.gz freebsd-ports-gnome-99b84901a594862a07842f364d6d209211c52106.tar.zst freebsd-ports-gnome-99b84901a594862a07842f364d6d209211c52106.zip |
Add spblas , NIST Sparse Basic Linear Algebra Subprograms (BLAS).
Diffstat (limited to 'math/spblas')
-rw-r--r-- | math/spblas/Makefile | 80 | ||||
-rw-r--r-- | math/spblas/distinfo | 4 | ||||
-rw-r--r-- | math/spblas/files/patch-nist_spblas.cc | 40 | ||||
-rw-r--r-- | math/spblas/pkg-descr | 9 |
4 files changed, 133 insertions, 0 deletions
diff --git a/math/spblas/Makefile b/math/spblas/Makefile new file mode 100644 index 000000000000..d722b12d9edf --- /dev/null +++ b/math/spblas/Makefile @@ -0,0 +1,80 @@ +# ex:ts=8 +# Ports collection makefile for: spblas +# Date created: 5 January 2012 +# Whom: bf@FreeBSD.org +# +# $FreeBSD$ +# + +PORTNAME= spblas +DISTVERSION= 1_02 +CATEGORIES= math +MASTER_SITES= http://math.nist.gov/spblas/:1 LOCAL/bf/:1 NL/blas/blast-forum/:2 +DISTNAME= nist_spblas_${DISTVERSION} +.ifndef(NOPORTDOCS) || make(makesum) +DISTFILES= ${EXTRACT_ONLY}:1 blas-report.pdf:2 +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} +.endif + +MAINTAINER= bf@FreeBSD.org +COMMENT= NIST Sparse Basic Linear Algebra Subprograms (BLAS) + +USE_DOS2UNIX= yes +USE_LDCONFIG= yes +USE_ZIP= yes + +HEADERS= blas_enum.h blas_sparse.h blas_sparse_proto.h +HDIR = include/spblas +MAKE_ENV= LIB=spblas SHLIB_MAJOR="${SHLIB_MAJOR}" \ + SRCCONF="${NONEXISTENT}" SRCS="${SRCS}" + +NO_WRKSUBDIR= yes +OPTIONS= PROFILE "Build and install a profiling library" Off + +PLIST_DIRS= ${HDIR} +PLIST_FILES= ${HEADERS:S|^|${HDIR}/|} lib/libspblas.a lib/libspblas.so \ + lib/libspblas.so.${SHLIB_MAJOR} + +SHLIB_MAJOR= 1 +SRCS= nist_spblas.cc + +.include <bsd.port.options.mk> + +.if defined(WITH_PROFILE) +.if defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE) +IGNORE = you have defined WITH_PROFILE, but have also defined\ +WITHOUT_PROFILE, NOPROFILE, or NO_PROFILE +.elif !exists(/usr/lib/libc_p.a) +IGNORE = you have chosen WITH_PROFILE, but have not installed the\ +base system profiling libraries +.endif +PLIST_FILES+= lib/libspblas_p.a +.else +MAKE_ENV+= NO_PROFILE=yes +.endif + +.ifndef(NOPORTDOCS) +PORTDOCS= blas-report.pdf +.endif + +.ifndef(NOPORTEXAMPLES) +PORTEXAMPLES= ${SRCS} +.endif + +post-extract: + @${PRINTF} "LIBDIR=\t${PREFIX}/lib\n.include <bsd.lib.mk>\n" > \ + ${WRKSRC}/Makefile + +post-install: + @${INSTALL_DATA} -d ${PREFIX}/${HDIR} + @cd ${WRKSRC}; ${INSTALL_DATA} ${HEADERS} ${PREFIX}/${HDIR} +.ifndef(NOPORTDOCS) + @${INSTALL_DATA} -d ${DOCSDIR} + @${INSTALL_DATA} ${_DISTDIR}/${PORTDOCS} ${DOCSDIR} +.endif +.ifndef(NOPORTEXAMPLES) + @${INSTALL_DATA} -d ${EXAMPLESDIR} + @cd ${WRKSRC}; ${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR} +.endif + +.include <bsd.port.mk> diff --git a/math/spblas/distinfo b/math/spblas/distinfo new file mode 100644 index 000000000000..3d9c084b5d88 --- /dev/null +++ b/math/spblas/distinfo @@ -0,0 +1,4 @@ +SHA256 (nist_spblas_1_02.zip) = 2567fd5fbef04a7ec4f649e2809245badcf04c3a866c36639089729e7de41d0b +SIZE (nist_spblas_1_02.zip) = 12619 +SHA256 (blas-report.pdf) = 7874962ae4dc753fcdd483ff0c69931227846632251f79a68f4f879348f321a6 +SIZE (blas-report.pdf) = 2412966 diff --git a/math/spblas/files/patch-nist_spblas.cc b/math/spblas/files/patch-nist_spblas.cc new file mode 100644 index 000000000000..29027b96ccc0 --- /dev/null +++ b/math/spblas/files/patch-nist_spblas.cc @@ -0,0 +1,40 @@ +--- nist_spblas.cc.orig 2012-01-05 12:33:16.000000000 -0500 ++++ nist_spblas.cc 2012-01-05 12:37:11.000000000 -0500 +@@ -54,7 +54,17 @@ + #define ERROR_RETURN(ret_val) return ret_val + #endif + ++/* dummy routines for real version of usdot to compile. */ ++ ++inline const double& conj(const double &x) ++{ ++ return x; ++} + ++inline const float& conj(const float &x) ++{ ++ return x; ++} + + using namespace std; + +@@ -1274,19 +1284,6 @@ + /* Level 1 generic routines */ + /* --------------------------- */ + +-/* dummy routines for real version of usdot to compile. */ +- +-inline const double& conj(const double &x) +-{ +- return x; +-} +- +-inline const float& conj(const float &x) +-{ +- return x; +-} +- +- + template <class T> + void BLAS_xusdot( enum blas_conj_type conj_flag, int nz, + const T *x, const int *index, const T *y, int incy, diff --git a/math/spblas/pkg-descr b/math/spblas/pkg-descr new file mode 100644 index 000000000000..248859def9ac --- /dev/null +++ b/math/spblas/pkg-descr @@ -0,0 +1,9 @@ +This is an ANSI C++ implementation of the complete ANSI C specification of +Chapter 3 of the BLAS Technical Forum Standard. The distribution is quite +small and it is meant as a starting point for developing an optimized and +architecture-dependent version. (C++ was used, rather than C, as it has support +for complex arithmetic and templates to facilitate to creation of various +precision codes.) The library includes support for all four precision types +(single, double precision, real, and complex) and Level 1, 2, and 3 operations. + +WWW: http://math.nist.gov/spblas/ |