You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

opr_result_defs.h 475 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <stdint.h>
  3. namespace megdnn {
  4. namespace opr_result {
  5. struct Checksum {
  6. uint32_t checksum;
  7. union {
  8. int32_t iv;
  9. float fv;
  10. } last_val;
  11. bool operator==(const Checksum& rhs) const {
  12. return checksum == rhs.checksum && last_val.iv == rhs.last_val.iv;
  13. }
  14. bool operator!=(const Checksum& rhs) const { return !operator==(rhs); }
  15. };
  16. } // namespace opr_result
  17. } // namespace megdnn
  18. // vim: syntax=cpp.doxygen