Files
pytorch/c10/util/Float8_e4m3fn.cpp
cyy 7663ffb673 [10/N] Fixes clang-tidy warnings in c10/util/*.h (#116326)
Still a continued work for clean up c10/util/*.h
Pull Request resolved: https://github.com/pytorch/pytorch/pull/116326
Approved by: https://github.com/Skylion007
2023-12-23 04:59:55 +00:00

16 lines
343 B
C++

#include <c10/util/Float8_e4m3fn.h>
#include <iostream>
#include <type_traits>
namespace c10 {
static_assert(
std::is_standard_layout_v<Float8_e4m3fn>,
"c10::Float8_e4m3fn must be standard layout.");
std::ostream& operator<<(std::ostream& out, const Float8_e4m3fn& value) {
out << (float)value;
return out;
}
} // namespace c10