14#include "local_proto.h"
16#define SEG_N_ROW_NONZERO(SEG, row, col) \
17 (((row) >> (SEG)->srowbits) * (SEG)->spr + ((col) >> (SEG)->scolbits))
19#define SEG_INDEX_ROW_NONZERO(SEG, row, col) \
20 ((((row) & ((SEG)->srows - 1)) << (SEG)->scolbits) + \
21 ((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))
46 *n = (row >>
SEG->srowbits) *
SEG->spr + (
col >>
SEG->scolbits);
47 *index = ((row & (
SEG->srows - 1)) <<
SEG->scolbits) +
64 *index =
col - ((*n) <<
SEG->scolbits);
67 *index =
SEG->fast_seek ? (*index <<
SEG->lenbits) : (*index *
SEG->len);
88 *index =
col - *n *
SEG->scols;
118 return SEG->address(
SEG, row,
col, n, index);
#define SEG_INDEX_ROW_NONZERO(SEG, row, col)
int seg_address_slow(const SEGMENT *SEG, off_t row, off_t col, int *n, int *index)
#define SEG_N_ROW_NONZERO(SEG, row, col)
int seg_address(const SEGMENT *SEG, off_t row, off_t col, int *n, int *index)
Internal use only.
#define SEG_INDEX_ROW_ZERO(SEG, col)
int seg_address_fast(const SEGMENT *SEG, off_t row, off_t col, int *n, int *index)
#define SEG_N_ROW_ZERO(SEG, col)
#define INDEX_ADJ(SEG, i)