30#ifndef SACADO_FAD_SERIALIZATIONTRAITSIMP_HPP
31#define SACADO_FAD_SERIALIZATIONTRAITSIMP_HPP
35#ifdef HAVE_SACADO_TEUCHOSCOMM
37#include "Teuchos_SerializationTraits.hpp"
38#include "Teuchos_SerializationTraitsHelpers.hpp"
39#include "Teuchos_RCP.hpp"
46 template <
typename Ordinal,
typename FadType,
typename Serializer>
47 struct SerializationImp {
52 typedef Teuchos::SerializationTraits<Ordinal,int>
iSerT;
55 typedef Teuchos::SerializationTraits<Ordinal,Ordinal>
oSerT;
82 Ordinal b3 = oSerT::fromCountToIndirectBytes(1, &
b2);
94 Ordinal b5 = oSerT::fromCountToIndirectBytes(1, &
b4);
122 Ordinal b3 = oSerT::fromCountToIndirectBytes(1, &
b2);
140 Ordinal b5 = oSerT::fromCountToIndirectBytes(1, &
b4);
160 Ordinal b1 = iSerT::fromCountToDirectBytes(1);
165 Ordinal b3 = oSerT::fromCountToDirectBytes(1);
173 Ordinal b5 = oSerT::fromCountToDirectBytes(1);
195 Ordinal b1 = iSerT::fromCountToDirectBytes(1);
205 Ordinal b3 = oSerT::fromCountToDirectBytes(1);
212 Ordinal b5 = oSerT::fromCountToDirectBytes(1);
227 template <
typename Ordinal,
typename FadType>
228 struct SerializationTraitsImp {
236 typedef Teuchos::DefaultSerializer<Ordinal,ValueT>
DS;
248 Imp::supportsDirectSerialization;
256 return Imp::fromCountToIndirectBytes(
272 return Imp::fromIndirectBytesToCount(
290 template <
typename Ordinal,
typename FadType>
291 struct StaticSerializationTraitsImp {
293 typedef Teuchos::SerializationTraits<Ordinal,ValueT>
vSerT;
294 typedef Teuchos::DirectSerializationTraits<Ordinal,FadType>
DSerT;
299 vSerT::supportsDirectSerialization;
306 return DSerT::fromCountToDirectBytes(
count);
311 return DSerT::convertToCharPtr(
ptr);
316 return DSerT::convertToCharPtr(
ptr);
321 return DSerT::fromDirectBytesToCount(
bytes);
326 return DSerT::convertFromCharPtr(
ptr);
331 return DSerT::convertFromCharPtr(
ptr);
343 return DSerT::fromCountToIndirectBytes(
count,
buffer);
345 return STI::fromCountToIndirectBytes(
count,
buffer);
384 template <
typename Ordinal,
typename FadType,
typename ValueSerializer>
385 class SerializerImp {
393 Teuchos::RCP<const ValueSerializer>
vs;
405 Imp::supportsDirectSerialization;
425 return Imp::fromCountToIndirectBytes(*
vs,
count,
buffer, sz);
expr expr expr fastAccessDx(i)) FAD_UNARYOP_MACRO(exp
Sacado::Fad::DFad< double > FadType
Fad specializations for Teuchos::BLAS wrappers.
BLAS(bool use_default_impl=true, bool use_dynamic=true, OrdinalType static_workspace_size=0)
Default constructor.