//We define the properties of an array of type char (INT8) with undef format (i.e. the user use it as he wants), of one dimension (vector) of 32 values.
vector.def_array('INT8','NDEF',1,32);
//The properties .dims have to be freed.
//The property .dims have to be freed.
//Be careful the .data memory is not allocated ! This is usefull if you want to associate the data to your own memory.
//We display the properties
vector.fprint_properties(stderr);
fprintf(stderr,"\n");
//We allocate the memory
vector.allocate();
...
...
@@ -19,9 +20,11 @@ int main(int argc, char **argv){
for(i=0;i!=vector.size;i++)vector.chars[i]=3;
//We define a matrix of 3x5
//The matrix is not allocated
matrix.def_array('FL32','NDEF',2,3,5);
//We allocate the content
matrix.allocate();
//We display the dim sizes
matrix.fprint_dims(stderr);
fprintf(stderr,"\n");
...
...
@@ -31,12 +34,30 @@ int main(int argc, char **argv){
(cd blc_core && git diff --exit-code t_array/array.tsv >> /tmp/blc_core_test.log 2>&1)||{echo"ERROR: The result of t_array/array.tsv is not the one expected";exit 3;}
(cd blc_core && git diff --exit-code t_array/array.blc >> /tmp/blc_core_test.log 2>&1)||{echo"ERROR: The result of t_array/array.blc is not the one expected";exit 3;}
echo"SUCCESS: blc_core has bin succesfully compiled, executed and tested"
echo"t_array succesfuly compiled, executed with the right output. (log in /tmp/blc_core_test.log)"