#define getValue(array, width, rows, cols) (*((array) + (rows) * (width) + (cols))) #define setValue(array, width, rows, cols, value) (*((array) + (rows) * (width) + (cols)) = (value))