28.03.2017 Views

Primitives

ippi_0

ippi_0

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.

Support Functions 3<br />

Example<br />

A code example below shows how to use the ippGetStatusString function. If you call an Intel IPP function,<br />

in this example ippiSet_8u_C1R, with a NULL pointer, it returns an error code -8.<br />

void statusInfo( void ) {<br />

}<br />

IppiSize roi = {0};<br />

IppStatus st = ippiSet_8u_C1R(3, 0, 0, roi );<br />

printf( " %d : %s\n", st, ippGetStatusString( st ));<br />

Output:<br />

-8, Null Pointer Error<br />

Memory Allocation Functions<br />

This section describes the Intel IPP functions that allocate aligned memory blocks for data of required type,<br />

or free previously allocated memory.<br />

NOTE<br />

The only function to free the memory allocated by any of these functions is ippiFree().<br />

Malloc<br />

Allocates memory aligned to 64-byte boundary.<br />

Syntax<br />

Case 1: Memory allocation for blocks of 32-bit sizes<br />

Ipp* ippiMalloc_(int widthPixels, int heightPixels, int* pStepBytes);<br />

Supported values for mod:<br />

8u_C1 16u_C1 16s_C1 32s_C1 32f_C1 32sc_C1 32fc_C1<br />

8u_C2 16u_C2 16s_C2 32s_C2 32f_C2 32sc_C2 32fc_C2<br />

8u_C3 16u_C3 16s_C3 32s_C3 32f_C3 32sc_C3 32fc_C3<br />

8u_C4 16u_C4 16s_C4 32s_C4 32f_C4 32sc_C4 32fc_C4<br />

8u_AC4 16u_AC4 16s_AC4 32s_AC4 32f_AC4 32sc_AC4 32fc_AC4<br />

Case 2: Memory allocation for platform-aware functions<br />

Ipp* ippiMalloc_(IppSizeL widthPixels, IppSizeL heightPixels, IppSizeL*<br />

pStepBytes);<br />

Supported values for mod:<br />

8u_C1_L 16u_C1_L 16s_C1_L 32s_C1_L 32f_C1_L 32sc_C1_L 32fc_C1_L<br />

8u_C2_L 16u_C2_L 16s_C2_L 32s_C2_L 32f_C2_L 32sc_C2_L 32fc_C2_L<br />

8u_C3_L 16u_C3_L 16s_C3_L 32s_C3_L 32f_C3_L 32sc_C3_L 32fc_C3_L<br />

8u_C4_L 16u_C4_L 16s_C4_L 32s_C4_L 32f_C4_L 32sc_C4_L 32fc_C4_L<br />

8u_AC4_L 16u_AC4_L 16s_AC4_L 32s_AC4_L 32f_AC4_L 32sc_AC4_L 32fc_AC4_L<br />

47

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

Saved successfully!

Ooh no, something went wrong!