Commit 701bf40b authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Merge branch 'master' of https://framagit.org/blaar/blc_core into HEAD

parents 599b7076 1ae20b8b
......@@ -24,7 +24,7 @@
#include <signal.h> //raise
#include <stdio.h> //fopen
blc_array::blc_array():dims(NULL), dims_nb(0){}
blc_array::blc_array():type('NDEF'), format('NDEF'), dims(NULL), dims_nb(0), total_length(0){}
blc_array::blc_array(uint32_t type, uint32_t format, int dims_nb, int length0, ...){
va_list arguments;
......
......@@ -9,7 +9,7 @@ int main(int argc, char **argv){
fprintf(stderr, "\nDefining a sinusoïd of 32 uchars vector\n\nProperties:\n");
//We define the properties of an array of type unsigned char (UIN8) with undef format (i.e. the user use it as he wants), of one dimension (vector) of 32 values.
vector.def_array('UIN8', 'NDEF', 1, 32);
//The property .dims have to be freed.
//The property .dims (list of all dimensions) has been allocated.
//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
......@@ -57,7 +57,7 @@ int main(int argc, char **argv){
//We save the value as a blc file that we will be able to reread
matrix.save_blc_file("blc_core/t_array/array.blc");
matrix.save_tsv_file("blc_core/t_array/array.tsv"); //Bigger but readable in text mode or within spreadshit
matrix.save_tsv_file("blc_core/t_array/array.tsv"); //Bigger but readable in text mode or within spreadsheet, excel, matlab
//We reload the matrix which should be identical
matrix_copy.init_with_blc_file("blc_core/t_array/array.blc");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment