library/src/utility/BP-NumberUtilities.cc
// converts a positive long long int to a size t (this is primarily
// used when dealing with the global os profiler (converting memory entries
// to size_t).  The method id kind of slow, but it's also absolutely safe
// to use so long as you account for the potential zero return values.
converts a positive long long int to a size t (this is primarily
used when dealing with the global os profiler (converting memory entries
to size_t).  The method id kind of slow, but it's also absolutely safe
to use so long as you account for the potential zero return values.
converts a positive long long int to a size t ( this is primarily used when dealing with the global os profiler ( converting memory entries to size_t ) . The method id kind of slow but it ' s also absolutely safe to use so long as you account for the potential zero return values .
size_t BP_LongLongIntToSizeT(long long int val)
{
	long long int iter = 0;
	size_t ret_iter = 0;
	if(iter >= val)
		return 0;
	for(; iter <= val;iter++)
	{
		if(iter >= (BP_GIGABYTE * 4 - 1))
			return 0;
		ret_iter++;
	}
	return ret_iter;
}
size_t BP_LongLongIntToSizeT ( long long int val ) { long long int iter = 0 ; size_t ret_iter = 0 ; if ( iter >= val ) return 0 ; for ( ; iter <= val ; iter ++ ) { if ( iter >= ( BP_GIGABYTE * 4 - 1 ) ) return 0 ; ret_iter ++ ; } return ret_iter ; }
converts a positive long long int to a size t (this is primarily
used when dealing with the global os profiler (converting memory entries
to size_t).
converts a positive long long int to a size t ( this is primarily used when dealing with the global os profiler ( converting memory entries to size_t ) .
// set the iterator // ensure the value is positive // only ever go as high as 4GB-1 // iterate the size_t // return the iter