SAGA API  v9.6
grid_memory.cpp File Reference
#include <memory.h>
#include "grid.h"
#include "parameters.h"

Go to the source code of this file.

Macros

#define CACHE_FILE_POS(x, y)   (m_Cache_Offset + (m_Cache_bFlip ? Get_NY() - 1 - y : y) * m_nBytes_Line + x * m_nBytes_Value)
 
#define CACHE_FILE_SEEK   _fseeki64
 

Functions

const SG_CharSG_Grid_Cache_Get_Directory (void)
 
void SG_Grid_Cache_Set_Directory (const SG_Char *Directory)
 
void SG_Grid_Cache_Set_Mode (int Mode)
 
int SG_Grid_Cache_Get_Mode (void)
 
void SG_Grid_Cache_Set_Threshold (int nBytes)
 
void SG_Grid_Cache_Set_Threshold_MB (double nMegabytes)
 
sLong SG_Grid_Cache_Get_Threshold (void)
 
double SG_Grid_Cache_Get_Threshold_MB (void)
 

Variables

static CSG_String gSG_Grid_Cache_Directory
 
static int gSG_Grid_Cache_Mode = 0
 
static sLong gSG_Grid_Cache_Threshold = 0
 

Macro Definition Documentation

◆ CACHE_FILE_POS

#define CACHE_FILE_POS (   x,
 
)    (m_Cache_Offset + (m_Cache_bFlip ? Get_NY() - 1 - y : y) * m_nBytes_Line + x * m_nBytes_Value)

Definition at line 247 of file grid_memory.cpp.

◆ CACHE_FILE_SEEK

#define CACHE_FILE_SEEK   _fseeki64

Definition at line 253 of file grid_memory.cpp.

Function Documentation

◆ SG_Grid_Cache_Get_Directory()

const SG_Char* SG_Grid_Cache_Get_Directory ( void  )

Get default directory for grid caching

Definition at line 81 of file grid_memory.cpp.

References gSG_Grid_Cache_Directory.

◆ SG_Grid_Cache_Get_Mode()

int SG_Grid_Cache_Get_Mode ( void  )

Definition at line 110 of file grid_memory.cpp.

References gSG_Grid_Cache_Mode.

◆ SG_Grid_Cache_Get_Threshold()

sLong SG_Grid_Cache_Get_Threshold ( void  )

Definition at line 139 of file grid_memory.cpp.

References gSG_Grid_Cache_Threshold.

◆ SG_Grid_Cache_Get_Threshold_MB()

double SG_Grid_Cache_Get_Threshold_MB ( void  )

Definition at line 145 of file grid_memory.cpp.

References gSG_Grid_Cache_Threshold, and N_MEGABYTE_BYTES.

◆ SG_Grid_Cache_Set_Directory()

void SG_Grid_Cache_Set_Directory ( const SG_Char Directory)

Set default directory for grid caching

Definition at line 87 of file grid_memory.cpp.

References gSG_Grid_Cache_Directory, and SG_Dir_Exists().

◆ SG_Grid_Cache_Set_Mode()

void SG_Grid_Cache_Set_Mode ( int  Mode)

Definition at line 104 of file grid_memory.cpp.

References gSG_Grid_Cache_Mode.

◆ SG_Grid_Cache_Set_Threshold()

void SG_Grid_Cache_Set_Threshold ( int  nBytes)

Definition at line 124 of file grid_memory.cpp.

References gSG_Grid_Cache_Threshold.

Referenced by SG_Grid_Cache_Set_Threshold_MB().

◆ SG_Grid_Cache_Set_Threshold_MB()

void SG_Grid_Cache_Set_Threshold_MB ( double  nMegabytes)

Definition at line 133 of file grid_memory.cpp.

References N_MEGABYTE_BYTES, and SG_Grid_Cache_Set_Threshold().

Variable Documentation

◆ gSG_Grid_Cache_Directory

CSG_String gSG_Grid_Cache_Directory
static

Definition at line 78 of file grid_memory.cpp.

Referenced by SG_Grid_Cache_Get_Directory(), and SG_Grid_Cache_Set_Directory().

◆ gSG_Grid_Cache_Mode

int gSG_Grid_Cache_Mode = 0
static

Definition at line 101 of file grid_memory.cpp.

Referenced by SG_Grid_Cache_Get_Mode(), and SG_Grid_Cache_Set_Mode().

◆ gSG_Grid_Cache_Threshold

sLong gSG_Grid_Cache_Threshold = 0
static