src/cmr/series_parallel.c
/**
 * \brief Allocates and initializes element data (on the stack).
 */
\brief Allocates and initializes element data (on the stack).
\ brief Allocates and initializes element data ( on the stack ) .
static
CMR_ERROR createElementData(
  CMR* cmr,                   
  ElementData** pelementData, 
  size_t size                 
)
{
  assert(cmr);
  assert(pelementData);
  CMR_CALL( CMRallocStackArray(cmr, pelementData, size) );
  ElementData* elementData = *pelementData;
  for (size_t e = 0; e < size; ++e)
  {
    elementData[e].hashValue = 0;
    elementData[e].hashEntry = SIZE_MAX;
    elementData[e].inQueue = false;
    elementData[e].lastBFS = 0;
  }
  return CMR_OKAY;
}
static CMR_ERROR createElementData ( CMR * cmr , ElementData * * pelementData , size_t size ) { assert ( cmr ) ; assert ( pelementData ) ; CMR_CALL ( CMRallocStackArray ( cmr , pelementData , size ) ) ; ElementData * elementData = * pelementData ; for ( size_t e = 0 ; e < size ; ++ e ) { elementData [ e ] . hashValue = 0 ; elementData [ e ] . hashEntry = SIZE_MAX ; elementData [ e ] . inQueue = false ; elementData [ e ] . lastBFS = 0 ; } return CMR_OKAY ; }
\brief Allocates and initializes element data (on the stack).
\ brief Allocates and initializes element data ( on the stack ) .
/**< \ref CMR environment. */ /**< Pointer for storing the element data. */ /**< Number of elements. */