Functions
core/vsl/vsl_block_binary.h File Reference

Set of functions to do binary IO on a block of values. More...

#include <vsl/vsl_binary_io.h>
#include <vsl/vsl_binary_explicit_io.h>

Go to the source code of this file.

Functions

void vsl_block_binary_read_confirm_specialisation (vsl_b_istream &is, bool specialised)
 Error checking.
template<class T >
void vsl_block_binary_write (vsl_b_ostream &os, const T *begin, vcl_size_t nelems)
 Write a block of values to a vsl_b_ostream, potentially very efficiently for fundamental types.
template<class T >
void vsl_block_binary_read (vsl_b_istream &is, T *begin, vcl_size_t nelems)
 Read a block of values from a vsl_b_ostream, potentially very efficiently for fundamental types.
template<class T >
void vsl_block_binary_write_float_impl (vsl_b_ostream &os, const T *begin, vcl_size_t nelems)
 Write a block of floats to a vsl_b_ostream.
template<class T >
void vsl_block_binary_read_float_impl (vsl_b_istream &is, T *begin, vcl_size_t nelems)
 Read a block of floats from a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const double *begin, vcl_size_t nelems)
 Write a block of doubles to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, double *begin, vcl_size_t nelems)
 Read a block of doubles from a vsl_b_istream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const float *begin, vcl_size_t nelems)
 Write a block of floats to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, float *begin, vcl_size_t nelems)
 Read a block of floats from a vsl_b_istream.
template<class T >
void vsl_block_binary_write_int_impl (vsl_b_ostream &os, const T *begin, vcl_size_t nelems)
 Write a block of signed ints to a vsl_b_ostream.
template<class T >
void vsl_block_binary_read_int_impl (vsl_b_istream &is, T *begin, vcl_size_t nelems)
 Read a block of signed ints from a vsl_b_istream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const int *begin, vcl_size_t nelems)
 Write a block of signed ints to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, int *begin, vcl_size_t nelems)
 Read a block of signed ints from a vsl_b_istream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const unsigned int *begin, vcl_size_t nelems)
 Write a block of unsigned ints to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, unsigned int *begin, vcl_size_t nelems)
 Read a block of unsigned ints from a vsl_b_istream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const short *begin, vcl_size_t nelems)
 Write a block of signed shorts to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, short *begin, vcl_size_t nelems)
 Read a block of signed shorts from a vsl_b_istream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const unsigned short *begin, vcl_size_t nelems)
 Write a block of unsigned shorts to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, unsigned short *begin, vcl_size_t nelems)
 Read a block of unsigned shorts from a vsl_b_istream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const long *begin, vcl_size_t nelems)
 Write a block of signed longs to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, long *begin, vcl_size_t nelems)
 Read a block of signed longs from a vsl_b_istream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const unsigned long *begin, vcl_size_t nelems)
 Write a block of unsigned longs to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, unsigned long *begin, vcl_size_t nelems)
 Read a block of unsigned longs from a vsl_b_istream.
template<class T >
void vsl_block_binary_write_byte_impl (vsl_b_ostream &os, const T *begin, vcl_size_t nelems)
 Write a block of bytes to a vsl_b_ostream.
template<class T >
void vsl_block_binary_read_byte_impl (vsl_b_istream &is, T *begin, vcl_size_t nelems)
 Read a block of bytes from a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const unsigned char *begin, vcl_size_t nelems)
 Write a block of unsigned chars to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, unsigned char *begin, vcl_size_t nelems)
 Read a block of unsigned chars from a vsl_b_istream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write (vsl_b_ostream &os, const signed char *begin, vcl_size_t nelems)
 Write a block of signed chars to a vsl_b_ostream.
VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read (vsl_b_istream &is, signed char *begin, vcl_size_t nelems)
 Read a block of signed chars from a vsl_b_istream.

Detailed Description

Set of functions to do binary IO on a block of values.

Author:
Ian Scott, ISBE Manchester, Feb 2003

Definition in file vsl_block_binary.h.


Function Documentation

template<class T >
void vsl_block_binary_read ( vsl_b_istream is,
T *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of values from a vsl_b_ostream, potentially very efficiently for fundamental types.

Read a block of values from a vsl_b_istream.

If you want to output a block of fundamental data types very efficiently, then just #include <vsl_binary_explicit_io.h>

Definition at line 331 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
double *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of doubles from a vsl_b_istream.

This function is very speed efficient.

Definition at line 49 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
float *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of floats from a vsl_b_istream.

This function is very speed efficient.

Definition at line 69 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
int *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of signed ints from a vsl_b_istream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 101 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
unsigned int *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of unsigned ints from a vsl_b_istream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 123 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
short *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of signed shorts from a vsl_b_istream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 146 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
unsigned short *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of unsigned shorts from a vsl_b_istream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 169 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
long *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of signed longs from a vsl_b_istream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 192 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
unsigned long *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of unsigned longs from a vsl_b_istream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 215 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
unsigned char *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of unsigned chars from a vsl_b_istream.

This function is very speed and space efficient.

Definition at line 290 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_read ( vsl_b_istream is,
signed char *  begin,
vcl_size_t  nelems 
) [inline]

Read a block of signed chars from a vsl_b_istream.

This function is very speed and space efficient.

Definition at line 308 of file vsl_block_binary.h.

template<class T >
void vsl_block_binary_read_byte_impl ( vsl_b_istream is,
T *  begin,
vcl_size_t  nelems 
)

Read a block of bytes from a vsl_b_ostream.

Definition at line 264 of file vsl_block_binary.cxx.

void vsl_block_binary_read_confirm_specialisation ( vsl_b_istream is,
bool  specialised 
)

Error checking.

Definition at line 45 of file vsl_block_binary.cxx.

template<class T >
void vsl_block_binary_read_float_impl ( vsl_b_istream is,
T *  begin,
vcl_size_t  nelems 
)

Read a block of floats from a vsl_b_ostream.

Definition at line 98 of file vsl_block_binary.cxx.

template<class T >
void vsl_block_binary_read_int_impl ( vsl_b_istream is,
T *  begin,
vcl_size_t  nelems 
)

Read a block of signed ints from a vsl_b_istream.

Definition at line 171 of file vsl_block_binary.cxx.

template<class T >
void vsl_block_binary_write ( vsl_b_ostream os,
const T *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of values to a vsl_b_ostream, potentially very efficiently for fundamental types.

Write a block of values to a vsl_b_ostream.

If you want to output a block of fundamental data types very efficiently, then just #include <vsl_binary_explicit_io.h>

Definition at line 320 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const double *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of doubles to a vsl_b_ostream.

This function is very speed efficient, but temporarily allocates a block of memory the size of the block being read.

Definition at line 41 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const float *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of floats to a vsl_b_ostream.

This function is very speed efficient, but temporarily allocates a block of memory the size of the block being read.

Definition at line 61 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const int *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of signed ints to a vsl_b_ostream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 91 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const unsigned int *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of unsigned ints to a vsl_b_ostream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 113 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const short *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of signed shorts to a vsl_b_ostream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 136 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const unsigned short *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of unsigned shorts to a vsl_b_ostream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 159 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const long *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of signed longs to a vsl_b_ostream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 182 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const unsigned long *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of unsigned longs to a vsl_b_ostream.

This function is very speed efficient, but temporarily allocates a block of memory the about 1.2 times size of the block being read.

Definition at line 205 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const unsigned char *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of unsigned chars to a vsl_b_ostream.

This function is very speed and space efficient.

Definition at line 282 of file vsl_block_binary.h.

VCL_DEFINE_SPECIALIZATION void vsl_block_binary_write ( vsl_b_ostream os,
const signed char *  begin,
vcl_size_t  nelems 
) [inline]

Write a block of signed chars to a vsl_b_ostream.

This function is very speed and space efficient.

Definition at line 300 of file vsl_block_binary.h.

template<class T >
void vsl_block_binary_write_byte_impl ( vsl_b_ostream os,
const T *  begin,
vcl_size_t  nelems 
)

Write a block of bytes to a vsl_b_ostream.

Definition at line 256 of file vsl_block_binary.cxx.

template<class T >
void vsl_block_binary_write_float_impl ( vsl_b_ostream os,
const T *  begin,
vcl_size_t  nelems 
)

Write a block of floats to a vsl_b_ostream.

Definition at line 69 of file vsl_block_binary.cxx.

template<class T >
void vsl_block_binary_write_int_impl ( vsl_b_ostream os,
const T *  begin,
vcl_size_t  nelems 
)

Write a block of signed ints to a vsl_b_ostream.

Definition at line 111 of file vsl_block_binary.cxx.