Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

df?SearchCellsCallBack

A callback function for user-defined search to be passed into df?InterpolateEx1D, df?IntegrateEx1D, or df?SearchCellsEx1D.

Syntax

status = dfsSearchCellsCallBack(n, site, cell, flag, user_params, library_params)

status = dfdSearchCellsCallBack(n, site, cell, flag, user_params, library_params)

Include Files

  • mkl.h

Input Parameters

Name

Type

Description

n

long long*

Number of interpolation sites or integration limits.

site

float* for dfsSearchCellsCallBack

double* for dfdSearchCellsCallBack

Array, size n, of interpolation sites or integration limits.

flag

int*

Array of size n, with values set as follows:

  • If the cell with index cell[i] contains site[i], set flag[i] to 1.
  • Otherwise, set flag[i] to zero. In this case, the library interprets the index as an approximation and computes the index of the cell containing site[i] by using the provided index as a starting point for the search.

user_params

void*

Pointer to user-defined parameters of the callback function.

library_params

dfSearchCallBackLibraryParams*

Pointer to library-defined parameters of the callback function.

Output Parameters

Name

Type

Description

status

int

The status returned by the callback function:

  • Zero indicates successful completion of the callback operation.
  • A negative value indicates an error.
  • The DF_STATUS_EXACT_RESULT status indicates that cell indices returned by the callback function are exact. In this case, you do not need to initialize entries of the flag array.

  • A positive value indicates a warning.
See "Task Status and Error Reporting" for error code definitions.

cell

long long*

Array of size n that returns indices of the cells computed by the callback function.

Description

When passed into the df?InterpolateEx1D, df?IntegrateEx1D, or df?SearchCellsEx1D routine, this function performs a user-defined search.

The library_params parameter allows the library to provide extra parameters. The df?InterpolateEx1D, and df?SearchCellsEx1D routines do not provide extra parameters and set library_params to NULL. The df?IntegrateEx1D routines use this parameter to specify which type of integration limits, left or right, are provided for the callback. To do this the library declares the dfSearchCallBackLibraryParams structure. It currently contains one field, limit_type_flag, of type int. The field is set by the library to one of two possible values: DF_INTEGR_SEARCH_CB_LLIM_FLAG if the left integration limits are provided, or DF_INTEGR_SEARCH_CB_RLIM_FLAG if the right integration limits are provided.