Skip to content

Commit

Permalink
Prado Utility TBitHelper for bit mirroring, reversing endian, color b…
Browse files Browse the repository at this point in the history
…it shift, half float and mini float support (#914)

* #904 TBitHelper Utility class for dealing with bits and endian

- Bit Mirroring
- endian flipping
- color bit shift
- unsigned right bit shift
- has LongLong
- # bits needed (given a number, how many bits is needed to represent it)
- checking System Endian
- negative zero float checking
   - check for floats as negative including -0.
   - check for -0 specifically.
- converting float to half float and mini float (Fp16, Bf16, Fp8-e5m2, and Fp8-e4m3 are supported directly).  General utility function for taking a float and outputting an arbitrary exponent and mantissa.

* Error messages.

* Reordered a reordering.
  • Loading branch information
belisoful authored Apr 27, 2023
1 parent 45ad8f6 commit 87d750f
Show file tree
Hide file tree
Showing 4 changed files with 946 additions and 1 deletion.
5 changes: 4 additions & 1 deletion framework/Exceptions/messages/messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,10 @@ dbcron_property_unchangeable = TDbCronModule.{0} is already initialized and ca

timescheduler_invalid_string = TTimeScheduler could not parse the schedule element '{0}'

datasize_no_negative_size = TDataSize.Size cannot be negative.
bithelper_bad_fp_format = TBitHelper cannot work with '{0}' exponent bits, '{1}' mantissa bits, '{2}' exponent bias, in a {3} bit PHP environment.
bithelper_invalid_color_in = TBitHelper must have at least one In Bit. '{0}' was given.
bithelper_invalid_color_out = TBitHelper must have at least one Out Bit. '{0}' was given.
bithelper_bad_mirror_bits = TBitHelper cannot mirror '{0}' bits in a {1} bit PHP environment.

ar_data_invalid = {0}.copyFrom() can only take an object or array as parameter.
ar_save_invalid = The {0} instance cannot be saved because it is either deleted or in an unknown state.
Expand Down
Loading

0 comments on commit 87d750f

Please sign in to comment.