This is the documentation for Enlighten.
module Half Precision Scalars
Classes
Name | Description |
|---|---|
Convenience value type for a half float. |
Variables
Name | Description |
|---|---|
const float g_MaxNegHalfFloat = -65504.0f | Largest representable negative half-float (=-(2 - 2^-10) * 2^15) |
const float g_MaxPosHalfFloat = 65504.0f | Largest representable positive half-float (=(2 - 2^-10) * 2^15) |
Functions
Name | Description |
|---|---|
Convert a float to a half. | |
ConvertFloatToHalfArray(Geo::u16 *, const float *, Geo::u32) | Convert an array of floats to an array of halves. |
Convert a half to a float. | |
ConvertHalfToFloatArray(const Geo::u16 *, float *, Geo::u32) | Convert an array of halves to an array of floats. |
ConvertV128ToHalfVectorArray(Geo::u64 *, const Geo::v128 *, Geo::u32) | Convert an array of v128s to an array of half vectors. |
Convert a 4-element array of half floats to a v128. | |
Convert a 4-element array of half floats to a v128. | |
Convert a v128 to a 4-element array of half floats. | |
Convert a v128 to a 4-element array of half floats. |
Geo::u16 GEO_CALL Geo::ConvertFloatToHalf
public: Geo::u16GEO_CALL ConvertFloatToHalf
(
float value
)
Convert a float to a half.
Currently using the portable implementation on all platforms.
void GEO_CALL Geo::ConvertFloatToHalfArray
public: void GEO_CALL ConvertFloatToHalfArray
(
Geo::u16 * halves,
const float * floats,
Geo::u32 count
)
Convert an array of floats to an array of halves.
On SSE platforms a faster implementation is used if:
halves is 8-byte aligned.
floats is 16-byte aligned.
count is a multiple of 4.