Developer Reference

Contents

vmlSetErrorCallBack

Sets the additional error handler callback function and gets the old callback function.

Syntax

oldcallback
=
vmlSetErrorCallBack
(
callback
)
;
Include Files
  • mkl.h
Input Parameters
Name
Description
callback
Pointer to the callback function.
The callback function has the following format:
static int __stdcall MyHandler(DefVmlErrorContext*
pContext)
{
   /* Handler body */
};
The passed error structure is defined as follows:
typedef struct _DefVmlErrorContext
{
int iCode;/* Error status value */
int iIndex;/* Index for bad array
   element, or bad array
   dimension, or bad
   array pointer */
double dbA1; /* Error argument 1 */
double dbA2; /* Error argument 2 */
double dbR1; /* Error result 1 */
double dbR2; /* Error result 2 */
char cFuncName[64]; /* Function name */
int iFuncNameLen; /* Length of functionname*/
double dbA1Im; /* Error argument 1, imag part*/
double dbA2Im; /* Error argument 2, imag part*/
double dbR1Im; /* Error result 1, imag part*/
double dbR2Im; /* Error result 2, imag part*/
} DefVmlErrorContext;
Output Parameters
Name
Type
Description
oldcallback
int
Pointer to the former callback function.
Description
The callback function is called on each VM mathematical function error if
VML_ERRMODE_CALLBACK
error mode is set .
Use the
vmlSetErrorCallBack()
function if you need to define your own callback function instead of default empty callback function.
The input structure for a callback function contains the following information about the error encountered:
  • the input value that caused an error
  • location (array index) of this value
  • the computed result value
  • error code
  • name of the function in which the error occurred.
You can insert your own error processing into the callback function. This may include correcting the passed result values in order to pass them back and resume computation. The standard error handler is called after the callback function only if it returns
0
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserverd for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804