Types.h 467 B

1234567891011121314151617181920212223242526272829
  1. #ifndef SNUVI_TYPES_H
  2. #define SNUVI_TYPES_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <assert.h>
  7. #include <limits.h>
  8. #include <stdint.h>
  9. typedef int8_t int8;
  10. typedef int16_t int16;
  11. typedef int32_t int32;
  12. typedef int64_t int64;
  13. typedef uint8_t uint8;
  14. typedef uint16_t uint16;
  15. typedef uint32_t uint32;
  16. typedef uint64_t uint64;
  17. typedef float float32;
  18. static_assert(sizeof(float32) * CHAR_BIT == 32, "float is not 32 bit");
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif