typedef struct { short rows; short cols; short *st; } matrix;