35 #ifndef _BLAZE_UTIL_SERIALIZATION_ARCHIVE_H_ 36 #define _BLAZE_UTIL_SERIALIZATION_ARCHIVE_H_ 140 template<
typename Stream >
148 template<
typename... Args >
149 explicit inline Archive( Args&&... args );
162 inline operator bool()
const;
170 template<
typename T >
173 template<
typename T >
176 template<
typename T >
179 template<
typename T >
182 template<
typename Type >
185 template<
typename Type >
193 inline typename Stream::int_type
peek()
const;
195 inline bool good()
const;
196 inline bool eof ()
const;
197 inline bool fail()
const;
198 inline bool bad ()
const;
200 inline std::ios_base::iostate
rdstate ()
const;
201 inline void setstate( std::ios_base::iostate state );
202 inline void clear ( std::ios_base::iostate state = std::ios_base::goodbit );
238 template<
typename Stream >
239 template<
typename... Args >
241 :
ptr_ ( new Stream(
std::forward<Args>( args )... ) )
255 template<
typename Stream >
280 template<
typename Stream >
297 template<
typename Stream >
319 template<
typename Stream >
320 template<
typename T >
323 using CharType =
typename Stream::char_type;
324 stream_.write( reinterpret_cast<const CharType*>( &value ),
sizeof( T ) );
336 template<
typename Stream >
337 template<
typename T >
352 template<
typename Stream >
353 template<
typename T >
356 using CharType =
typename Stream::char_type;
357 stream_.read( reinterpret_cast<CharType*>( &value ),
sizeof( T ) );
369 template<
typename Stream >
370 template<
typename T >
388 template<
typename Stream >
389 template<
typename Type >
393 using CharType =
typename Stream::char_type;
394 stream_.write( reinterpret_cast<const CharType*>( array ), count*
sizeof(Type) );
411 template<
typename Stream >
412 template<
typename Type >
416 using CharType =
typename Stream::char_type;
417 stream_.read( reinterpret_cast<CharType*>( array ), count*
sizeof(Type) );
436 template<
typename Stream >
449 template<
typename Stream >
462 template<
typename Stream >
475 template<
typename Stream >
488 template<
typename Stream >
501 template<
typename Stream >
515 template<
typename Stream >
529 template<
typename Stream >
Stream::int_type peek() const
Reads the next character from the input stream without extracting it.
Definition: Archive.h:437
Binary archive for the portable serialization of data.The Archive class implements the functionality ...
Definition: Archive.h:141
Header file for basic type definitions.
Base class for non-copyable class instances.
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
bool good() const
Checks if no error has occurred, i.e. I/O operations are available.
Definition: Archive.h:450
Stream & stream_
Reference to the bound stream.
Definition: Archive.h:215
void clear(std::ios_base::iostate state=std::ios_base::goodbit)
Clears error and eof flags.
Definition: Archive.h:530
Header file for the DisableIf class template.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Archive(Args &&... args)
Creating an archive with an internal stream resource.
Definition: Archive.h:240
void serialize(Archive &archive, const Matrix< MT, SO > &mat)
Serializes the given matrix and writes it to the archive.
Definition: MatrixSerializer.h:1268
bool eof() const
Checks if end-of-file (EOF) has been reached.
Definition: Archive.h:463
Base class for non-copyable class instances.The NonCopyable class is intended to work as a base class...
Definition: NonCopyable.h:63
Header file for the EnableIf class template.
std::ios_base::iostate rdstate() const
Returns the current state flags settings.
Definition: Archive.h:502
std::unique_ptr< Stream > ptr_
The dynamically allocated stream resource.
Definition: Archive.h:211
Header file for the IsNumeric type trait.
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > stream(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned, non-temporal store of a vector of 1-byte integral values.
Definition: Stream.h:75
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
void deserialize(Archive &archive, Matrix< MT, SO > &mat)
Deserializes a matrix from the given archive.
Definition: MatrixSerializer.h:1290
bool fail() const
Checks if a recoverable error has occurred.
Definition: Archive.h:476
void setstate(std::ios_base::iostate state)
Sets the state flags to a specific value.
Definition: Archive.h:516
bool bad() const
Checks if a non-recoverable error has occurred.
Definition: Archive.h:489
bool operator!() const
Returns the negated state of the archive.
Definition: Archive.h:298