1.5.1
CCC
 
Piles.hpp File Reference
#include "gstlearn_export.hpp"

Functions

GSTLEARN_EXPORT void pile_reset (int type)
 
GSTLEARN_EXPORT void piles_reset (void)
 
GSTLEARN_EXPORT int pile_next (int type)
 
GSTLEARN_EXPORT void pile_manage (int type, int rank, int mode, char *ptr)
 
GSTLEARN_EXPORT int pile_correct (int type, int rank, int mode)
 
GSTLEARN_EXPORT char * pile_get (int type, int rank)
 
GSTLEARN_EXPORT void piles_dump (void)
 

Function Documentation

◆ pile_correct()

GSTLEARN_EXPORT int pile_correct ( int  type,
int  rank,
int  mode 
)

Check if the Pile is managed correctly

Returns
1 if the Pile Management is incorrect; 0 otherwise
Parameters
[in]typeType of the pile
[in]rankRank of the slot
[in]modeStatus
  • 1 : Check that the element must be already allocated
  • -1 : Check that the element will be allocated

◆ pile_get()

GSTLEARN_EXPORT char* pile_get ( int  type,
int  rank 
)

Returns the address managed in the pile

Parameters
[in]typeType of the pile
[in]rankRank of the slot

◆ pile_manage()

GSTLEARN_EXPORT void pile_manage ( int  type,
int  rank,
int  mode,
char *  ptr 
)

Manage the pile

Parameters
[in]typeType of the pile
[in]rankRank of the slot
[in]mode1 for allocation and -1 for deallocation
[in]ptrPointor to be stored (allocation mode)

◆ pile_next()

GSTLEARN_EXPORT int pile_next ( int  type)

Returns the rank of the first free element

Returns
Rank of the first available slot or -1 if failure
Parameters
[in]typeType of the pile

◆ pile_reset()

GSTLEARN_EXPORT void pile_reset ( int  type)

Reset one pile

Parameters
[in]typeType of the pile
Remarks
This function must be called compulsorily when entering RGeostats

◆ piles_dump()

GSTLEARN_EXPORT void piles_dump ( void  )

Dump the piles contents

◆ piles_reset()

GSTLEARN_EXPORT void piles_reset ( void  )

Reset all the piles

Remarks
This function must be called compulsorily when entering RGeostats