1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _PERF_XYARRAY_H_
3 #define _PERF_XYARRAY_H_ 1
16 struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size);
17 void xyarray__delete(struct xyarray *xy);
18 void xyarray__reset(struct xyarray *xy);
20 static inline void *xyarray__entry(struct xyarray *xy, int x, int y)
22 return &xy->contents[x * xy->row_size + y * xy->entry_size];
25 static inline int xyarray__max_y(struct xyarray *xy)
30 static inline int xyarray__max_x(struct xyarray *xy)
35 #endif /* _PERF_XYARRAY_H_ */