parent
71109fa551
commit
5a6cd4b0f2
18 changed files with 333 additions and 115 deletions
|
|
@ -1,59 +1,66 @@
|
|||
#define SIZE 64
|
||||
#define TYPE double
|
||||
#define STORAGE_ORDER Eigen::ColMajor
|
||||
//==================================================================================================
|
||||
/*
|
||||
ROTGEN - Runtime Overlay for Eigen
|
||||
Copyright : CODE RECKONS
|
||||
SPDX-License-Identifier: BSL-1.0
|
||||
*/
|
||||
//==================================================================================================
|
||||
#define SIZE 64
|
||||
#define TYPE double
|
||||
#define STORAGE_ORDER Eigen::ColMajor
|
||||
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define MAPNAME ROTGEN_MATRIX_NAME(BASEMAP,SIZE,_col)
|
||||
#include "block_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef MAPNAME
|
||||
#undef STORAGE_ORDER
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define MAPNAME ROTGEN_MATRIX_NAME(BASEMAP,SIZE,_col)
|
||||
#include "block_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef MAPNAME
|
||||
#undef STORAGE_ORDER
|
||||
|
||||
#define STORAGE_ORDER Eigen::RowMajor
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define MAPNAME ROTGEN_MATRIX_NAME(BASEMAP,SIZE,_row)
|
||||
#include "block_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef MAPNAME
|
||||
#undef STORAGE_ORDER
|
||||
#define STORAGE_ORDER Eigen::RowMajor
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define MAPNAME ROTGEN_MATRIX_NAME(BASEMAP,SIZE,_row)
|
||||
#include "block_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef MAPNAME
|
||||
#undef STORAGE_ORDER
|
||||
|
||||
#undef SIZE
|
||||
#undef TYPE
|
||||
#undef SIZE
|
||||
#undef TYPE
|
||||
|
||||
#define SIZE 32
|
||||
#define TYPE float
|
||||
#define STORAGE_ORDER Eigen::ColMajor
|
||||
#define SIZE 32
|
||||
#define TYPE float
|
||||
#define STORAGE_ORDER Eigen::ColMajor
|
||||
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define MAPNAME ROTGEN_MATRIX_NAME(BASEMAP,SIZE,_col)
|
||||
#include "block_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef MAPNAME
|
||||
#undef STORAGE_ORDER
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define MAPNAME ROTGEN_MATRIX_NAME(BASEMAP,SIZE,_col)
|
||||
#include "block_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef MAPNAME
|
||||
#undef STORAGE_ORDER
|
||||
|
||||
#define STORAGE_ORDER Eigen::RowMajor
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define MAPNAME ROTGEN_MATRIX_NAME(BASEMAP,SIZE,_row)
|
||||
#include "block_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef MAPNAME
|
||||
#undef STORAGE_ORDER
|
||||
#define STORAGE_ORDER Eigen::RowMajor
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define MAPNAME ROTGEN_MATRIX_NAME(BASEMAP,SIZE,_row)
|
||||
#include "block_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef MAPNAME
|
||||
#undef STORAGE_ORDER
|
||||
|
||||
#undef SIZE
|
||||
#undef TYPE
|
||||
#undef SIZE
|
||||
#undef TYPE
|
||||
|
|
@ -394,6 +394,12 @@ struct CLASSNAME::payload
|
|||
return os;
|
||||
}
|
||||
|
||||
ROTGEN_EXPORT std::ostream& operator<<(std::ostream& os,format<CLASSNAME> const& m)
|
||||
{
|
||||
m.matrix_.storage_->apply([&](const auto& blk) { os << blk.format(m.format_.storage()->instance); });
|
||||
return os;
|
||||
}
|
||||
|
||||
ROTGEN_EXPORT bool operator==(CLASSNAME const& lhs, CLASSNAME const& rhs)
|
||||
{
|
||||
return std::visit ( [](auto const& lhs_blk, auto const& rhs_blk) { return lhs_blk.first == rhs_blk.first; }
|
||||
|
|
|
|||
27
src/format.cpp
Normal file
27
src/format.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
//==================================================================================================
|
||||
/*
|
||||
ROTGEN - Runtime Overlay for Eigen
|
||||
Copyright : CODE RECKONS
|
||||
SPDX-License-Identifier: BSL-1.0
|
||||
*/
|
||||
//==================================================================================================
|
||||
|
||||
#include <rotgen/config.hpp>
|
||||
#include <rotgen/dynamic/format.hpp>
|
||||
#include <rotgen/impl/payload.hpp>
|
||||
#include <Eigen/Core>
|
||||
#include <string>
|
||||
|
||||
namespace rotgen
|
||||
{
|
||||
ioformat::ioformat( int p, int f
|
||||
, std::string const& cs, std::string const& rsp
|
||||
, std::string const& rp, std::string const& rs
|
||||
, std::string const& mp, std::string const& ms
|
||||
, char fill
|
||||
)
|
||||
: storage_(std::make_unique<payload>(p,f,cs,rsp,rp,rs,mp,ms,fill))
|
||||
{}
|
||||
|
||||
ioformat::~ioformat() = default;
|
||||
}
|
||||
|
|
@ -1,67 +1,74 @@
|
|||
#define SIZE 64
|
||||
#define TYPE double
|
||||
#define STORAGE_ORDER Eigen::ColMajor
|
||||
//==================================================================================================
|
||||
/*
|
||||
ROTGEN - Runtime Overlay for Eigen
|
||||
Copyright : CODE RECKONS
|
||||
SPDX-License-Identifier: BSL-1.0
|
||||
*/
|
||||
//==================================================================================================
|
||||
#define SIZE 64
|
||||
#define TYPE double
|
||||
#define STORAGE_ORDER Eigen::ColMajor
|
||||
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define CLASSCONSTNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_col)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#include "map_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSCLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef CLASSCONSTNAME
|
||||
#undef SOURCENAME
|
||||
#undef STORAGE_ORDER
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define CLASSCONSTNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_col)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#include "map_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSCLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef CLASSCONSTNAME
|
||||
#undef SOURCENAME
|
||||
#undef STORAGE_ORDER
|
||||
|
||||
#define STORAGE_ORDER Eigen::RowMajor
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define CLASSCONSTNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_row)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#include "map_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSCLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef CLASSCONSTNAME
|
||||
#undef STORAGE_ORDER
|
||||
#define STORAGE_ORDER Eigen::RowMajor
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define CLASSCONSTNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_row)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#include "map_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSCLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef SOURCENAME
|
||||
#undef CLASSCONSTNAME
|
||||
#undef STORAGE_ORDER
|
||||
|
||||
#undef SIZE
|
||||
#undef TYPE
|
||||
#undef SIZE
|
||||
#undef TYPE
|
||||
|
||||
#define SIZE 32
|
||||
#define TYPE float
|
||||
#define STORAGE_ORDER Eigen::ColMajor
|
||||
#define SIZE 32
|
||||
#define TYPE float
|
||||
#define STORAGE_ORDER Eigen::ColMajor
|
||||
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define CLASSCONSTNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_col)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#include "map_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSCLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef CLASSCONSTNAME
|
||||
#undef SOURCENAME
|
||||
#undef STORAGE_ORDER
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#define CLASSCONSTNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_col)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#include "map_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSCLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef CLASSCONSTNAME
|
||||
#undef SOURCENAME
|
||||
#undef STORAGE_ORDER
|
||||
|
||||
#define STORAGE_ORDER Eigen::RowMajor
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define CLASSCONSTNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_row)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#include "map_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSCLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef CLASSCONSTNAME
|
||||
#undef SOURCENAME
|
||||
#undef STORAGE_ORDER
|
||||
#define STORAGE_ORDER Eigen::RowMajor
|
||||
#define CLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_row)
|
||||
#define TRANSCLASSNAME ROTGEN_MATRIX_NAME(BASENAME,SIZE,_col)
|
||||
#define TRANSSOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_col)
|
||||
#define CLASSCONSTNAME ROTGEN_MATRIX_NAME(map_const_impl,SIZE,_row)
|
||||
#define SOURCENAME ROTGEN_MATRIX_NAME(matrix_impl,SIZE,_row)
|
||||
#include "map_model.cpp"
|
||||
#undef CLASSNAME
|
||||
#undef TRANSCLASSNAME
|
||||
#undef TRANSSOURCENAME
|
||||
#undef CLASSCONSTNAME
|
||||
#undef SOURCENAME
|
||||
#undef STORAGE_ORDER
|
||||
|
||||
#undef SIZE
|
||||
#undef TYPE
|
||||
#undef SIZE
|
||||
#undef TYPE
|
||||
|
|
|
|||
|
|
@ -265,6 +265,11 @@
|
|||
return os << m.storage_->data;
|
||||
}
|
||||
|
||||
ROTGEN_EXPORT std::ostream& operator<<(std::ostream& os,format<CLASSNAME> const& m)
|
||||
{
|
||||
return os << m.matrix_.storage_->data.format(m.format_.storage()->instance);
|
||||
}
|
||||
|
||||
ROTGEN_EXPORT bool operator==(CLASSNAME const& lhs, CLASSNAME const& rhs)
|
||||
{
|
||||
return lhs.storage_->data == rhs.storage_->data;
|
||||
|
|
|
|||
|
|
@ -175,6 +175,11 @@ ROTGEN_EXPORT std::ostream& operator<<(std::ostream& os,CLASSNAME const& m)
|
|||
return os << m.storage_->data;
|
||||
}
|
||||
|
||||
ROTGEN_EXPORT std::ostream& operator<<(std::ostream& os,format<CLASSNAME> const& m)
|
||||
{
|
||||
return os << m.matrix_.storage_->data.format(m.format_.storage()->instance);
|
||||
}
|
||||
|
||||
ROTGEN_EXPORT bool operator==(CLASSNAME const& lhs, CLASSNAME const& rhs)
|
||||
{
|
||||
return lhs.storage_->data == rhs.storage_->data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue