diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-02-18 12:22:58 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-02-18 12:22:58 +0330 |
commit | 7903ae7711f323697bbc42ad756c8ea0138c70dc (patch) | |
tree | 117f2b35a89c0c48b2902dbeccf1f5d63f29294e /src/utils/type.c | |
parent | cb6eaf13c3b3b58779a18255177589d8d5fbf85b (diff) |
add f16 f32 f64 f128
Diffstat (limited to 'src/utils/type.c')
-rw-r--r-- | src/utils/type.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/utils/type.c b/src/utils/type.c new file mode 100644 index 0000000..dea08ef --- /dev/null +++ b/src/utils/type.c @@ -0,0 +1,21 @@ +#include "type.h" + +#include <assert.h> + +void checkTypes() { + assert(sizeof(i8) == (8 / 8)); + assert(sizeof(i16) == (16 / 8)); + assert(sizeof(i32) == (32 / 8)); + assert(sizeof(i64) == (64 / 8)); + + assert(sizeof(u8) == (8 / 8)); + assert(sizeof(u16) == (16 / 8)); + assert(sizeof(u32) == (32 / 8)); + assert(sizeof(u64) == (64 / 8)); + + assert(sizeof(f16) == (16 / 8)); + assert(sizeof(f32) == (32 / 8)); + assert(sizeof(f64) == (64 / 8)); + assert(sizeof(f128) == (128 / 8)); +} + |