15 #include "local_proto.h" 17 #define SEG_N_ROW_NONZERO(SEG, row, col) \ 18 (((row) >> (SEG)->srowbits) * (SEG)->spr + ((col) >> (SEG)->scolbits)) 20 #define SEG_INDEX_ROW_NONZERO(SEG, row, col) \ 21 ((((row) & ((SEG)->srows - 1)) << (SEG)->scolbits) + ((col) & ((SEG)->scols - 1))) 23 #define SEG_N_ROW_ZERO(SEG, col) ((col) >> (SEG)->scolbits) 25 #define SEG_INDEX_ROW_ZERO(SEG, col) ((col) & ((SEG)->scols - 1)) 27 #define INDEX_ADJ(SEG, i) \ 28 ((SEG)->fast_seek ? ((i) << (SEG)->lenbits) : ((i) * (SEG)->len)) 63 *index = col - ((*n) << SEG->
scolbits);
77 off_t seg_r = row / SEG->
srows;
78 off_t seg_c = col / SEG->
scols;
80 *n = seg_r * SEG->
spr + seg_c;
81 *index = (row - seg_r * SEG->
srows) * SEG->
scols + col -
86 *n = col / SEG->
scols;
87 *index = col - *n * SEG->
scols;
117 return SEG->
address(SEG, row, col, n, index);
#define SEG_INDEX_ROW_NONZERO(SEG, row, col)
#define SEG_INDEX_ROW_ZERO(SEG, col)
int seg_address_slow(const SEGMENT *SEG, off_t row, off_t col, int *n, int *index)
int seg_address_fast(const SEGMENT *SEG, off_t row, off_t col, int *n, int *index)
#define SEG_N_ROW_NONZERO(SEG, row, col)
#define INDEX_ADJ(SEG, i)
int seg_address(const SEGMENT *SEG, off_t row, off_t col, int *n, int *index)
Internal use only.
#define SEG_N_ROW_ZERO(SEG, col)