Contains miscellaneous structs, macros, type etc used by multiple files (Git Repo with Notes)
precision_t
double
or single
float precision. By default, precision_t
is set to double. One can edit the line #define PRECISION double
to #define PRECISION float
to change it to float
.
Data
Data
is a union that stores some 1d array of data depending on the dtype.
Use Data.int_data
to store int values. Data.prec_data, Data.string_data
for precision_t, string respectively. This helps in making more complex types like Vectors, helping us to store different datatypes under the same type "Vector".
DataType
INT, PREC, STRING
corresponds to int, precision_t, string type respectively.
arith_oper
ADD, SUB, MUL, DIV, POW