intel ipp examples
#define genPRINT(TYPE,FMT) \
void printf_##TYPE(const char* msg, Ipp##TYPE* buf, int len, IppStatus st ) { \
int n; \
if( st > ippStsNoErr ) \
printf( "\n-- warning %d, %s", st, ippGetStatusString( st )); \
else if( st < ippStsNoErr ) \
printf( "\n-- error %d, %s", st, ippGetStatusString( st )); \
printf("\n %s \n", msg ); \
for( n=0; n<len; ++n ) printf( FMT, buf[n] ); \
printf("\n" ); \
}
genPRINT( 64f, " %f" )
genPRINT( 32f, " %f" )
genPRINT( 32u, " %u" )
genPRINT( 16s, " %d" )
genPRINT( 8u, " %u" )
#define genPRINTcplx(TYPE,FMT) \
void printf_##TYPE(const char* msg, Ipp##TYPE* buf, int len, IppStatus st ) { \
int n; \
if( st > ippStsNoErr ) \
printf( "\n-- warning %d, %s", st, ippGetStatusString( st )); \
else if( st < ippStsNoErr ) \
printf( "\n-- error %d, %s", st, ippGetStatusString( st )); \
printf(" %s ", msg ); \
for( n=0; n<len; ++n ) printf( FMT, buf[n].re, buf[n].im ); \
printf("\n" ); \
}
genPRINTcplx( 64fc, " {%f,%f}" )
genPRINTcplx( 32fc, " {%f,%f}" )
genPRINTcplx( 16sc, " {%d,%d}" )
#define genPRINT_2D(TYPE,FMT) \
void printf_##TYPE##_2D(const char* msg, Ipp##TYPE* buf, IppiSize roi, int step, IppStatus st ) { \
int i, j; \
if ( st > ippStsNoErr ) { \
printf( "\n-- warning %d, %s", st, ippGetStatusString( st )); \
} else if ( st < ippStsNoErr ) { \
printf( "\n-- error %d, %s", st, ippGetStatusString( st )); \
} \
printf("\n %s \n", msg ); \
for ( i=0; i<roi.height; i++ ) { \
for ( j=0; j<roi.width; j++ ) { \
printf( FMT, ((Ipp##TYPE*)(((Ipp8u*)buf) + i*step))[j] ); \
} \
printf("\n"); \
} \
printf("\n" ); \
}
genPRINT_2D( 8u, " %u" )
genPRINT_2D( 32f, " %.1f" )
Are there any code examples left?
New code examples in category Other
-
Other 2023-03-27 22:50:10 how to select the whole line in vscode with keyboard shortcut
-
Other 2022-03-27 22:45:24 income of a web developer
-
Other 2022-03-27 22:35:01 \pyrcc_main.py: File does not exist 'resources.qrc'
-
Other 2022-03-27 22:30:45 rick roll embed code
-
Other 2022-03-27 22:20:08 Circuit_04_Potentiometer
-
Other 2022-03-27 22:20:05 iterative power
-
Other 2022-03-27 22:15:11 flutter run all
-
Other 2022-03-27 22:10:05 when is karlson release
-
Other 2022-03-27 22:10:02 wp .htaccess example
-
Other 2022-03-27 22:00:08 bash pause in file read line by line