GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
Address routines. More...
#include "local_proto.h"
Go to the source code of this file.
Macros | |
#define | SEG_N_ROW_NONZERO(SEG, row, col) (((row) >> (SEG)->srowbits) * (SEG)->spr + ((col) >> (SEG)->scolbits)) |
#define | SEG_INDEX_ROW_NONZERO(SEG, row, col) |
#define | SEG_N_ROW_ZERO(SEG, col) ((col) >> (SEG)->scolbits) |
#define | SEG_INDEX_ROW_ZERO(SEG, col) ((col) & ((SEG)->scols - 1)) |
#define | INDEX_ADJ(SEG, i) ((SEG)->fast_seek ? ((i) << (SEG)->lenbits) : ((i) * (SEG)->len)) |
Functions | |
int | seg_address_fast (const SEGMENT *SEG, off_t row, off_t col, int *n, int *index) |
int | seg_address_slow (const SEGMENT *SEG, off_t row, off_t col, int *n, int *index) |
int | seg_address (const SEGMENT *SEG, off_t row, off_t col, int *n, int *index) |
Internal use only. More... | |
Address routines.
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file address.c.
#define INDEX_ADJ | ( | SEG, | |
i | |||
) | ((SEG)->fast_seek ? ((i) << (SEG)->lenbits) : ((i) * (SEG)->len)) |
#define SEG_INDEX_ROW_NONZERO | ( | SEG, | |
row, | |||
col | |||
) |
#define SEG_INDEX_ROW_ZERO | ( | SEG, | |
col | |||
) | ((col) & ((SEG)->scols - 1)) |
#define SEG_N_ROW_NONZERO | ( | SEG, | |
row, | |||
col | |||
) | (((row) >> (SEG)->srowbits) * (SEG)->spr + ((col) >> (SEG)->scolbits)) |
#define SEG_N_ROW_ZERO | ( | SEG, | |
col | |||
) | ((col) >> (SEG)->scolbits) |
int seg_address | ( | const SEGMENT * | SEG, |
off_t | row, | ||
off_t | col, | ||
int * | n, | ||
int * | index | ||
) |
Internal use only.
Gets segment address and setsn and index.
[in] | SEG | segment |
[in] | row | |
[in] | col | |
[in,out] | n | |
[in,out] | index |
Definition at line 108 of file address.c.
References SEGMENT::address.
int seg_address_fast | ( | const SEGMENT * | SEG, |
off_t | row, | ||
off_t | col, | ||
int * | n, | ||
int * | index | ||
) |
Definition at line 30 of file address.c.
References SEGMENT::fast_seek, INDEX_ADJ, SEGMENT::len, SEGMENT::lenbits, SEGMENT::scolbits, SEGMENT::scols, SEG_INDEX_ROW_NONZERO, SEG_INDEX_ROW_ZERO, SEG_N_ROW_NONZERO, SEG_N_ROW_ZERO, SEGMENT::spr, SEGMENT::srowbits, and SEGMENT::srows.
Referenced by seg_setup().
int seg_address_slow | ( | const SEGMENT * | SEG, |
off_t | row, | ||
off_t | col, | ||
int * | n, | ||
int * | index | ||
) |
Definition at line 74 of file address.c.
References SEGMENT::len, SEGMENT::scols, SEGMENT::spr, and SEGMENT::srows.
Referenced by seg_setup().