pytorch/c10/util/quint8.h
xiorcale 6a37582162 Fix misleading doc string in quint8.h (#48418)
Summary:
The doc string let suppose that `quint8` is for singed 8 bit values.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/48418

Reviewed By: ngimel

Differential Revision: D25181705

Pulled By: mrshenli

fbshipit-source-id: 70e151b6279fef75505f80a7b0cd50032b4f1008
2020-11-25 20:48:39 -08:00

19 lines
320 B
C++

#pragma once
#include <cstdint>
#include <c10/macros/Macros.h>
namespace c10 {
/**
* quint8 is for unsigned 8 bit quantized Tensors
*/
struct alignas(1) quint8 {
using underlying = uint8_t;
uint8_t val_;
quint8() = default;
C10_HOST_DEVICE explicit quint8(uint8_t val) : val_(val) {}
};
} // namespace c10