packedfloat.cpp 456 B

123456789101112131415161718
  1. #include "packedfloat.h"
  2. #include <util/stream/output.h>
  3. #define OUT_IMPL(T) \
  4. template <> \
  5. void Out<T>(IOutputStream & os, TTypeTraits<T>::TFuncParam val) { \
  6. os << (float)val; \
  7. }
  8. OUT_IMPL(f16)
  9. OUT_IMPL(uf16)
  10. OUT_IMPL(f8)
  11. OUT_IMPL(uf8)
  12. OUT_IMPL(f8d)
  13. OUT_IMPL(uf8d)
  14. #undef OUT_IMPL