10#include <alien/core/backend/BackEnd.h>
12#include <alien/utils/ObjectWithTrace.h>
78 ALIEN_ASSERT((impl != NULL), (
"Null implementation"));
79 ALIEN_ASSERT((impl->
backend() == backend), (
"Bad backend"));
80 T* t =
dynamic_cast<T*
>(impl);
81 ALIEN_ASSERT((t != NULL), (
"Bad dynamic cast"));
96 ALIEN_ASSERT((impl != NULL), (
"Null implementation"));
97 ALIEN_ASSERT((impl->
backend() == backend), (
"Bad backend"));
98 const T* t =
dynamic_cast<const T*
>(impl);
99 ALIEN_ASSERT((t != NULL), (
"Bad dynamic cast"));
104template<
typename SourceTagT,
114 virtual void convert(SourceMatrixType
const& source, TargetMatrixType& target)
const = 0 ;
virtual void convert(const IMatrixImpl *sourceImpl, IMatrixImpl *targetImpl) const =0
Convert a matrix from one format to another.
virtual BackEndId sourceBackend() const =0
Get the source backend id.
virtual ~IMatrixConverter()
Free resources.
Alien::BackEndId BackEndId
Type of matrix backend.
static const T & cast(const IMatrixImpl *impl, BackEndId backend)
Const cast a matrix implementation in its actual type.
virtual BackEndId targetBackend() const =0
Get the target backend id.
Alien::IMatrixImpl IMatrixImpl
Type of matrix implementation.
static T & cast(IMatrixImpl *impl, BackEndId backend)
Cast a matrix implementation in its actual type.
Interface to handle abstract matrices implementation.
virtual BackEndId backend() const
virtual ~MatrixConverterT()
Free resources.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --