Cirrus Logic CS485 Especificações Página 50

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 319
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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 página 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 318 319

Comentários a estes Manuais

Sem comentários