When a column is created, its data is initialized to the NA value of the
obitype
This commit is contained in:
@ -14,8 +14,9 @@
|
||||
|
||||
|
||||
#define OBIInt_NA (INT32_MIN)
|
||||
#define OBIFloat_NA (NAN)
|
||||
#define OBIIdx_NA (SIZE_MAX)
|
||||
#define OBIFloat_NA (float_NA())
|
||||
#define OBIChar_NA (0) // TODO not sure about this one as it can be impossible to distinguish from uninitialized values
|
||||
|
||||
|
||||
/**
|
||||
@ -47,6 +48,22 @@ typedef char obichar_t;
|
||||
typedef size_t obiidx_t;
|
||||
|
||||
|
||||
typedef union
|
||||
{
|
||||
double value;
|
||||
unsigned int word[2];
|
||||
} ieee_double;
|
||||
|
||||
|
||||
static double float_NA(void) // as defined in R
|
||||
{
|
||||
volatile ieee_double x;
|
||||
x.word[0] = 0x7ff00000;
|
||||
x.word[1] = 1954;
|
||||
return x.value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief returns the memory size in bytes of an OBIType
|
||||
*
|
||||
|
Reference in New Issue
Block a user