Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Static Public Member Functions | Public Attributes

vl::half Class Reference

Represents an half-precision floating point value. More...

#include <half.hpp>

List of all members.

Public Member Functions

 half ()
 half (const half &hf)
 half (int i)
 half (long long i)
 half (float f)
 half (double d)
 operator float () const
 operator double () const
 operator int () const
 operator long long () const
halfoperator= (const half &other)
half operator+ (const half &other) const
halfoperator+= (const half &other)
half operator- (const half &other) const
halfoperator-= (const half &other)
half operator* (const half &other) const
halfoperator*= (const half &other)
half operator/ (const half &other) const
halfoperator/= (const half &other)
bool isZero () const
 operator bool () const
bool operator== (const half &other) const
bool operator== (const float &other) const
bool operator== (const double &other) const
bool operator== (const int &other) const
bool operator== (const long long &other) const
bool operator!= (const half &other) const
bool operator!= (const float &other) const
bool operator!= (const double &other) const
bool operator!= (const int &other) const
bool operator!= (const long long &other) const
bool operator< (const half &other) const
bool operator> (const half &other) const
bool isNaN () const
bool isinf () const
bool isinf_pos () const
bool isinf_neg () const
bool isdenorm () const
half operator- () const

Static Public Member Functions

static half infinity ()
static half NaN ()
static void convertDoubleToHalf (const double *d, half *h, int count)
static void convertHalfToDouble (const half *h, double *d, int count)
static half convertFloatToHalf (float f)
static float convertHalfToFloat (const half &h)
static void convertFloatToHalf (const float *f, half *h, int count)
static void convertHalfToFloat (const half *h, float *f, int count)

Public Attributes

unsigned short bits

Detailed Description

Represents an half-precision floating point value.

Definition at line 40 of file half.hpp.


Constructor & Destructor Documentation

vl::half::half (  ) [inline]

Definition at line 43 of file half.hpp.

vl::half::half ( const half hf ) [inline]

Definition at line 45 of file half.hpp.

vl::half::half ( int  i ) [inline]

Definition at line 47 of file half.hpp.

vl::half::half ( long long  i ) [inline]

Definition at line 49 of file half.hpp.

vl::half::half ( float  f ) [inline]

Definition at line 51 of file half.hpp.

vl::half::half ( double  d ) [inline]

Definition at line 53 of file half.hpp.


Member Function Documentation

vl::half::operator float (  ) const [inline]

Definition at line 55 of file half.hpp.

References convertHalfToFloat().

vl::half::operator double (  ) const [inline]

Definition at line 60 of file half.hpp.

References convertHalfToFloat().

vl::half::operator int (  ) const [inline]

Definition at line 65 of file half.hpp.

References convertHalfToFloat().

vl::half::operator long long (  ) const [inline]

Definition at line 70 of file half.hpp.

References convertHalfToFloat().

half& vl::half::operator= ( const half other ) [inline]

Definition at line 75 of file half.hpp.

References bits.

half vl::half::operator+ ( const half other ) const [inline]

Definition at line 81 of file half.hpp.

References convertFloatToHalf(), and convertHalfToFloat().

half& vl::half::operator+= ( const half other ) [inline]

Definition at line 86 of file half.hpp.

References convertFloatToHalf(), and convertHalfToFloat().

half vl::half::operator- ( const half other ) const [inline]

Definition at line 91 of file half.hpp.

References convertFloatToHalf(), and convertHalfToFloat().

half& vl::half::operator-= ( const half other ) [inline]

Definition at line 96 of file half.hpp.

References convertFloatToHalf(), and convertHalfToFloat().

half vl::half::operator* ( const half other ) const [inline]

Definition at line 101 of file half.hpp.

References convertFloatToHalf(), and convertHalfToFloat().

half& vl::half::operator*= ( const half other ) [inline]

Definition at line 106 of file half.hpp.

References convertFloatToHalf(), and convertHalfToFloat().

half vl::half::operator/ ( const half other ) const [inline]

Definition at line 111 of file half.hpp.

References convertFloatToHalf(), and convertHalfToFloat().

half& vl::half::operator/= ( const half other ) [inline]

Definition at line 116 of file half.hpp.

References convertFloatToHalf(), and convertHalfToFloat().

bool vl::half::isZero (  ) const [inline]

Definition at line 121 of file half.hpp.

References bits.

Referenced by operator bool(), operator!=(), and operator==().

vl::half::operator bool (  ) const [inline]

Definition at line 126 of file half.hpp.

References isZero().

bool vl::half::operator== ( const half other ) const [inline]

Definition at line 131 of file half.hpp.

References bits, isNaN(), and isZero().

Referenced by operator==().

bool vl::half::operator== ( const float &  other ) const [inline]

Definition at line 142 of file half.hpp.

References convertFloatToHalf(), and operator==().

bool vl::half::operator== ( const double &  other ) const [inline]

Definition at line 147 of file half.hpp.

References convertFloatToHalf(), and operator==().

bool vl::half::operator== ( const int &  other ) const [inline]

Definition at line 152 of file half.hpp.

References convertFloatToHalf(), and operator==().

bool vl::half::operator== ( const long long &  other ) const [inline]

Definition at line 157 of file half.hpp.

References convertFloatToHalf(), and operator==().

bool vl::half::operator!= ( const half other ) const [inline]

Definition at line 162 of file half.hpp.

References bits, isNaN(), and isZero().

Referenced by operator!=().

bool vl::half::operator!= ( const float &  other ) const [inline]

Definition at line 173 of file half.hpp.

References convertFloatToHalf(), and operator!=().

bool vl::half::operator!= ( const double &  other ) const [inline]

Definition at line 178 of file half.hpp.

References convertFloatToHalf(), and operator!=().

bool vl::half::operator!= ( const int &  other ) const [inline]

Definition at line 183 of file half.hpp.

References convertFloatToHalf(), and operator!=().

bool vl::half::operator!= ( const long long &  other ) const [inline]

Definition at line 188 of file half.hpp.

References convertFloatToHalf(), and operator!=().

bool vl::half::operator< ( const half other ) const [inline]

Definition at line 193 of file half.hpp.

References convertHalfToFloat().

bool vl::half::operator> ( const half other ) const [inline]

Definition at line 198 of file half.hpp.

References convertHalfToFloat().

bool vl::half::isNaN (  ) const [inline]

Definition at line 203 of file half.hpp.

References bits, and vl::exp().

Referenced by operator!=(), and operator==().

bool vl::half::isinf (  ) const [inline]

Definition at line 210 of file half.hpp.

References bits, and vl::exp().

bool vl::half::isinf_pos (  ) const [inline]

Definition at line 217 of file half.hpp.

References bits, vl::exp(), and vl::sign().

bool vl::half::isinf_neg (  ) const [inline]

Definition at line 225 of file half.hpp.

References bits, vl::exp(), and vl::sign().

bool vl::half::isdenorm (  ) const [inline]

Definition at line 233 of file half.hpp.

References bits, and vl::exp().

half vl::half::operator- (  ) const [inline]

Definition at line 240 of file half.hpp.

References bits.

static half vl::half::infinity (  ) [inline, static]

Definition at line 248 of file half.hpp.

References bits.

static half vl::half::NaN (  ) [inline, static]

Definition at line 255 of file half.hpp.

References bits.

static void vl::half::convertDoubleToHalf ( const double *  d,
half h,
int  count 
) [inline, static]

Definition at line 262 of file half.hpp.

References convertFloatToHalf().

static void vl::half::convertHalfToDouble ( const half h,
double *  d,
int  count 
) [inline, static]

Definition at line 268 of file half.hpp.

References convertHalfToFloat().

static half vl::half::convertFloatToHalf ( float  f ) [inline, static]
static float vl::half::convertHalfToFloat ( const half h ) [inline, static]
static void vl::half::convertFloatToHalf ( const float *  f,
half h,
int  count 
) [inline, static]

Definition at line 366 of file half.hpp.

References bits, vl::exp(), and vl::sign().

static void vl::half::convertHalfToFloat ( const half h,
float *  f,
int  count 
) [inline, static]

Definition at line 411 of file half.hpp.

References bits, vl::exp(), and vl::sign().


Member Data Documentation

unsigned short vl::half::bits

The documentation for this class was generated from the following file:

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:06.
Permission is granted to use this page to write and publish articles regarding Visualization Library.