|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58498 - sandbox/numeric_bindings/boost/numeric/bindings/blas/detail
From: rutger_at_[hidden]
Date: 2009-12-22 14:25:37
Author: rutger
Date: 2009-12-22 14:25:36 EST (Tue, 22 Dec 2009)
New Revision: 58498
URL: http://svn.boost.org/trac/boost/changeset/58498
Log:
added blas and cblas options (tag to value)
Added:
sandbox/numeric_bindings/boost/numeric/bindings/blas/detail/blas_option.hpp (contents, props changed)
sandbox/numeric_bindings/boost/numeric/bindings/blas/detail/cblas_option.hpp (contents, props changed)
Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/detail/blas_option.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/detail/blas_option.hpp 2009-12-22 14:25:36 EST (Tue, 22 Dec 2009)
@@ -0,0 +1,57 @@
+//
+// Copyright (c) 2009 Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_BLAS_OPTION_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_BLAS_OPTION_HPP
+
+#include <boost/mpl/char.hpp>
+#include <boost/numeric/bindings/tag.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+namespace detail {
+
+template< typename Tag >
+struct blas_option {};
+
+template<>
+struct blas_option< tag::transpose >: mpl::char_< 'T' > {};
+
+template<>
+struct blas_option< tag::no_transpose >: mpl::char_< 'N' > {};
+
+template<>
+struct blas_option< tag::conjugate >: mpl::char_< 'C' > {};
+
+template<>
+struct blas_option< tag::upper >: mpl::char_< 'U' > {};
+
+template<>
+struct blas_option< tag::lower >: mpl::char_< 'L' > {};
+
+template<>
+struct blas_option< tag::unit >: mpl::char_< 'U' > {};
+
+template<>
+struct blas_option< tag::non_unit >: mpl::char_< 'N' > {};
+
+template<>
+struct blas_option< tag::left >: mpl::char_< 'L' > {};
+
+template<>
+struct blas_option< tag::right >: mpl::char_< 'R' > {};
+
+} // namespace detail
+} // namespace blas
+} // namespace bindings
+} // namespace numeric
+} // namespace boost
+
+#endif
Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/detail/cblas_option.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/detail/cblas_option.hpp 2009-12-22 14:25:36 EST (Tue, 22 Dec 2009)
@@ -0,0 +1,63 @@
+//
+// Copyright (c) 2009 Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_CBLAS_OPTION_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_CBLAS_OPTION_HPP
+
+#include <boost/mpl/int.hpp>
+#include <boost/numeric/bindings/tag.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+namespace detail {
+
+template< typename Tag >
+struct cblas_option {};
+
+template<>
+struct cblas_option< tag::row_major >: mpl::int_< CblasRowMajor > {};
+
+template<>
+struct cblas_option< tag::column_major >: mpl::int_< CblasColMajor > {};
+
+template<>
+struct cblas_option< tag::transpose >: mpl::int_< CblasTrans > {};
+
+template<>
+struct cblas_option< tag::no_transpose >: mpl::int_< CblasNoTrans > {};
+
+template<>
+struct cblas_option< tag::conjugate >: mpl::int_< CblasConjTrans > {};
+
+template<>
+struct cblas_option< tag::upper >: mpl::int_< CblasUpper > {};
+
+template<>
+struct cblas_option< tag::lower >: mpl::int_< CblasLower > {};
+
+template<>
+struct cblas_option< tag::unit >: mpl::int_< CblasUnit > {};
+
+template<>
+struct cblas_option< tag::non_unit >: mpl::int_< CblasNonUnit > {};
+
+template<>
+struct cblas_option< tag::left >: mpl::int_< CblasLeft > {};
+
+template<>
+struct cblas_option< tag::right >: mpl::int_< CblasRight > {};
+
+} // namespace detail
+} // namespace blas
+} // namespace bindings
+} // namespace numeric
+} // namespace boost
+
+#endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk