Cirrus Logic CS485 Especificaciones Pagina 50

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 319
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 49
Intel
®
Image Processing Library Reference Manual
3-14
3
Example 3-1 Error Functions (continued)
/* library function */
void libFuncB(double a, int order) {
float *vec;
if (order > 31) {
IPL_ERROR(IPL_StsBadArg, "libFuncB",
"order must be less than or equal to 31");
return;
}
if ((vec = libFuncD(a, order)) == NULL) {
IPL_ERRCHK("libFuncB", "compute using a");
return;
}
/* code to do some real work goes here */
free(vec);
} // next: library function called internally
double *libFuncD(double a, int order) {
double *vec;
if ((vec=(double*)malloc(order*sizeof(double))) == NULL) {
IPL_ERROR(IPL_StsNoMem, "libFuncD",
"allocating a vector of doubles");
return NULL;
}
/* do something with vec */
return vec;
}
When the program is run, it produces the output illustrated in Example 3-2.
Vista de pagina 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 318 319

Comentarios a estos manuales

Sin comentarios