42 void init(
const T &val);
64 #define imRef(im, x, y) (im->access[y][x])
67 #define imPtr(im, x, y) &(im->access[y][x])
77 for (
int i = 0; i < h; i++)
78 access[i] = data + (i * w);
81 memset(data, 0, w * h *
sizeof(T));
92 T *ptr =
imPtr(
this, 0, 0);
93 T *end =
imPtr(
this, w-1, h-1);
102 memcpy(im->
data, data, w * h *
sizeof(T));
image(int width, int height, bool init=true)
image< T > * copy() const
Class and structs in single-thread CPU bp implementation by Pedro Felzenwalb available at https://cs....