ceph: use i_size_{read,write} to get/set i_size
[linux/fpc-iii.git] / tools / perf / util / xyarray.h
blob7f30af371b7ee692f23b9bf4aeb354584f453722
1 #ifndef _PERF_XYARRAY_H_
2 #define _PERF_XYARRAY_H_ 1
4 #include <sys/types.h>
6 struct xyarray {
7 size_t row_size;
8 size_t entry_size;
9 size_t entries;
10 char contents[];
13 struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size);
14 void xyarray__delete(struct xyarray *xy);
15 void xyarray__reset(struct xyarray *xy);
17 static inline void *xyarray__entry(struct xyarray *xy, int x, int y)
19 return &xy->contents[x * xy->row_size + y * xy->entry_size];
22 #endif /* _PERF_XYARRAY_H_ */