26#ifndef CASA_CONVERSION_H
27#define CASA_CONVERSION_H
30#include <casacore/casa/aips.h>
31#include <casacore/casa/string.h>
95 typedef size_t ValueFunction(
void* to,
const void* from,
size_t nvalues);
108 static size_t boolToBit(
void* to,
const void* from,
size_t nvalues);
109 static void boolToBit(
void* to,
const void* from,
size_t startBit,
size_t nvalues);
116 static size_t bitToBool(
void* to,
const void* from,
size_t nvalues);
117 static void bitToBool(
void* to,
const void* from,
size_t startBit,
size_t nvalues);
125 static size_t valueCopy(
void* to,
const void* from,
size_t nbytes);
133 static size_t bitToBool_(
void* to,
const void* from,
size_t nvalues);
size_t ValueFunction(void *to, const void *from, size_t nvalues)
Define the signature of a function converting nvalues values from internal to external format or vice...
static void boolToBit(void *to, const void *from, size_t startBit, size_t nvalues)
void * ByteFunction(void *to, const void *from, size_t nbytes)
Define the signature of a function converting from one format to another providing the number of byte...
static size_t bitToBool(void *to, const void *from, size_t nvalues)
Convert a stream of Bools to output format (as bits).
static size_t valueCopy(void *to, const void *from, size_t nbytes)
Copy a value using memcpy.
static size_t bitToBool_(void *to, const void *from, size_t nvalues)
Copy bits to Bool in an unoptimized way needed when 'to' is not aligned properly.
static size_t boolToBit(void *to, const void *from, size_t nvalues)
Convert a stream of Bools to output format (as bits).
static ByteFunction * getmemcpy()
Get a pointer to the memcpy function.
static void bitToBool(void *to, const void *from, size_t startBit, size_t nvalues)
For temporary backward namespace compatibility, use casa as alias for casacore.