infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#pragma once
29#include <inttypes.h> // For uint64_t
30#include <stddef.h> // For offsetof
31
39typedef struct {
40 double x;
41 double y;
42} Point;
43
52typedef struct {
53 float v[4];
54} Vector4;
55
62typedef struct {
63 long long data[4];
64} LargeData;
65
72typedef union {
73 int i;
74 float f;
75} Number;
76
84typedef struct {
85 int a, b, c, d, e, f;
87
96typedef struct {
97 int i;
98 double d;
100
107typedef struct {
108 int * val_ptr;
109 const char * str_ptr;
111
118#pragma pack(push, 1)
119typedef struct {
120 char a;
121 uint64_t b;
123#pragma pack(pop)
124
131typedef struct {
132 int a, b, c;
A struct guaranteed to be larger than two registers (32 bytes).
Definition types.h:62
A struct with a size greater than 16 bytes.
Definition types.h:84
int a
Definition types.h:85
A struct with mixed integer and floating-point members.
Definition types.h:96
int i
Definition types.h:97
double d
Definition types.h:98
A struct whose size is not a power of two (12 bytes on most 64-bit systems).
Definition types.h:131
int a
Definition types.h:132
A struct that will have different layouts when packed vs. non-packed.
Definition types.h:119
char a
Definition types.h:120
uint64_t b
Definition types.h:121
A simple struct with two doubles (16 bytes).
Definition types.h:39
double x
Definition types.h:40
double y
Definition types.h:41
A struct containing pointer members.
Definition types.h:107
const char * str_ptr
Definition types.h:109
int * val_ptr
Definition types.h:108
A struct containing a fixed-size array of floats.
Definition types.h:52
A simple union of an integer and a float.
Definition types.h:72
float f
Definition types.h:74
int i
Definition types.h:73