Class Reference for E1039 Core & Analysis Software
VariableArrayUtils.cc
Go to the documentation of this file.
1
#include "
VariableArrayUtils.h
"
2
#include <half/half.h>
3
4
short
5
VariableArrayUtils::FloatToShortBits
(
const
float
rval)
6
{
7
half
ftoi(rval);
8
return
ftoi.
bits
();
9
}
10
11
float
12
VariableArrayUtils::ShortBitsToFloat
(
const
short
ival)
13
{
14
half
halfvar;
15
halfvar.
setBits
(ival);
16
return
halfvar;
17
}
VariableArrayUtils.h
VariableArrayUtils::FloatToShortBits
static short FloatToShortBits(const float rval)
Definition:
VariableArrayUtils.cc:5
VariableArrayUtils::ShortBitsToFloat
static float ShortBitsToFloat(const short ival)
Definition:
VariableArrayUtils.cc:12
half
Definition:
half.h:103
half::setBits
void setBits(unsigned short bits)
Definition:
half.h:761
half::bits
unsigned short bits() const
Definition:
half.h:754
e1039-core
packages
vararray
VariableArrayUtils.cc
Built by
Haiwang Yu
. updated:
Thu Jan 30 2025 10:15:16
using
1.9.1 with
SeaQuest GitHub integration