1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __LIBPERF_INTERNAL_XYARRAY_H
3 #define __LIBPERF_INTERNAL_XYARRAY_H
5 #include <linux/compiler.h>
14 char contents[] __aligned(8);
17 struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size);
18 void xyarray__delete(struct xyarray *xy);
19 void xyarray__reset(struct xyarray *xy);
21 static inline void *xyarray__entry(struct xyarray *xy, int x, int y)
23 return &xy->contents[x * xy->row_size + y * xy->entry_size];
26 static inline int xyarray__max_y(struct xyarray *xy)
31 static inline int xyarray__max_x(struct xyarray *xy)
36 #endif /* __LIBPERF_INTERNAL_XYARRAY_H */