qint32.h 319 B

123456789101112131415161718
  1. #pragma once
  2. #include <cstdint>
  3. #include <c10/macros/Macros.h>
  4. namespace c10 {
  5. /**
  6. * qint32 is for signed 32 bit quantized Tensors
  7. */
  8. struct alignas(4) qint32 {
  9. using underlying = int32_t;
  10. int32_t val_;
  11. qint32() = default;
  12. C10_HOST_DEVICE explicit qint32(int32_t val) : val_(val) {}
  13. };
  14. } // namespace c10