10.11.2012 Views

Reference Manual of the nadc-tools API and Libraries - SRON

Reference Manual of the nadc-tools API and Libraries - SRON

Reference Manual of the nadc-tools API and Libraries - SRON

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.12.13 FREE 4D<br />

Identifier FREE 4D<br />

Purpose free memory allocated with ALLOC x4D<br />

Usage FREE 4D( cube );<br />

Input void ****cube : memory allocated with ALLOC x4D<br />

Returns nothing<br />

Comment none<br />

2.13 BinarySearch<br />

Identifier BinarySearch<br />

Author R.M. van Hees<br />

Language ANSI C<br />

Purpose searches an array[index[]] for presence <strong>of</strong> ”value”<br />

Usage res = BinarySearch( dim, index, array, value );<br />

Input int dim : dimension <strong>of</strong> <strong>the</strong> array to be sorted<br />

int *index : indices to sort ”array”<br />

int *array : array to be searched<br />

int value : value to be found in array<br />

Returns first occurences where array[index[res]] ¿= value<br />

Comment None<br />

2.14 NADC BITS<br />

Identifier NADC BITS<br />

Author R.M. van Hees<br />

Language ANSI C<br />

Purpose set/read bits in a unsigned long long variable<br />

Comment contains Set Bit LL <strong>and</strong> Get Bit LL<br />

2.14.1 Set Bit LL<br />

Identifier Set Bit LL<br />

Purpose set bits in a unsigned long long variable<br />

Usage Set Bit LL( x ull, pos );<br />

Input unsigned long long *x ull : input value<br />

unsigned char pos : position <strong>of</strong> bit to be set or read<br />

Returns Nothing<br />

Comment None<br />

2.14.2 Get Bit LL<br />

Identifier Get Bit LL<br />

Purpose read bits in a unsigned long long variable<br />

Usage x ull = Get Bit LL( x ull, pos );<br />

Input unsigned long long x ull : input value<br />

unsigned char pos : position <strong>of</strong> bit to be set or read<br />

Returns value <strong>of</strong> <strong>the</strong> requested bit (unsigned long long)<br />

Comment None<br />

32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!