GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRBP / dev > grbpsiu / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

wrap.h File Reference

Implements simple wrap around functions for circular lists. More...


Functions

static __inline int wrap_hi (int idx, int max)
 Ensures idx is in the interval [0, max). The check is only down on the upper bound.
static __inline int wrap_lo (int idx, int max)
 Ensures idx is in the interval [0, max). The check is only down on the lower bound.


Detailed Description

Implements simple wrap around functions for circular lists.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: wrap.h,v 1.1.1.1 2007/06/18 00:42:58 russell Exp $

Function Documentation

static __inline int wrap_hi ( int  idx,
int  max 
) [static]

Ensures idx is in the interval [0, max). The check is only down on the upper bound.

Returns:
The constrained index
Parameters:
idx The index to check
max The biase to subtract to idx if it is greater than max

Referenced by bit_list_clear(), copy(), copy_or(), find(), GRBP_clusterListAdd(), GRBP_gammaListAdd(), and GRBP_grbAdd().

static __inline int wrap_lo ( int  idx,
int  max 
) [static]

Ensures idx is in the interval [0, max). The check is only down on the lower bound.

Returns:
The constrained index
Parameters:
idx The index to check
max The biase to add to idx if it is less than 0

Referenced by GRBP_messageFormat(), and GRBP_windowTier1LatUpdate().


Generated on Wed Sep 28 10:05:50 2011 by  doxygen 1.5.8