13.07.2014 Views

Madagascar Programming Reference Manual

Madagascar Programming Reference Manual

Madagascar Programming Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.1. CONVENIENCE ALLOCATION PROGRAMS (ALLOC.C) 51<br />

n2<br />

number of elements in the slower dimension (size t).<br />

Output<br />

ptr<br />

a void pointer pointing to the allocated block of memory.<br />

4.1.26 sf uncharalloc3<br />

Allocates a 3D array in the memory for the float type. It works just like sf uncharalloc2<br />

but does it for three dimensions. This is done by extending the same argument as for<br />

sf uncharalloc2 but this time making a pointer such that Pointer2 -> Pointer1 -><br />

Pointer. n1 is the fastest dimension.<br />

Call<br />

ptr = sf_ucharalloc3 (n1, n2, n3);<br />

Definition<br />

unsigned char ***sf_ucharalloc3 (size_t n1 /* fast dimension */,<br />

size_t n2 /* slower dimension */,<br />

size_t n3 /* slowest dimension */)<br />

/*< unsigned char 3-D allocation, out[0][0] points to a contiguous array >*/<br />

{<br />

...<br />

}<br />

Input parameters<br />

n1<br />

n2<br />

n3<br />

number of elements in the fastest dimension (size t).<br />

number of elements in the slower dimension (size t).<br />

number of elements in the slower dimension (size t).<br />

Output<br />

ptr<br />

a void pointer pointing to the allocated block of memory.

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

Saved successfully!

Ooh no, something went wrong!