Visible to Intel only — GUID: GUID-96309FCD-C5F7-4B5C-AB1A-E68DFAD1B1DE
Visible to Intel only — GUID: GUID-96309FCD-C5F7-4B5C-AB1A-E68DFAD1B1DE
df?EditIdxPtr
Modifies a pointer to the memory representing a coordinate of the data stored in matrix format.
Syntax
status = dfsEditIdxPtr(task, ptr_attr, idx, ptr)
status = dfdEditIdxPtr(task, ptr_attr, idx, ptr)
Include Files
- mkl.h
Input Parameters
Name |
Type |
Description |
---|---|---|
task |
DFTaskPtr |
Descriptor of the task. |
ptr_attr |
const MKL_INT |
Type of the data to be modified. The parameter takes one of the values described in "Data Attributes Supported by the df?EditIdxPtr Task Editor". |
idx |
const MKL_INT |
Index of the coordinate whose pointer is to be modified. |
ptr |
const float* for dfsEditIdxPtr const double* for dfdEditIdxPtr |
Pointer to the data that holds values of coordinate idx. For details, see table "Data Attributes Supported by the df?EditIdxPtr Task Editor". |
Output Parameters
Name |
Type |
Description |
---|---|---|
status |
int |
Status of the routine:
|
Description
The routine modifies a pointer to the array that holds the idx coordinate of vector-valued function y or the pointer to the array of spline coefficients corresponding to the given coordinate.
You can use the editor if you need to pass into a Data Fitting task or modify the pointer to coordinates of the vector-valued function or spline coefficients held at non-contiguous memory locations. Do not use the editor for coordinates at contiguous memory locations in row-major format.
Before calling this editor, make sure that you have created and initialized the task using a task creation function or a relevant editor such as the generic or specific df?EditPPSpline1D editor.
Data Attribute |
Description |
---|---|
DF_Y |
Vector-valued function y |
DF_PP_SCOEFF |
Piecewise polynomial spline coefficients |
When using df?EditIdxPtr, you might receive an error code in the following cases:
You passed an unsupported parameter value into the editor.
The value of the index exceeds the predefined value that equals the dimension ny of the vector-valued function.
You pass a NULL pointer to the editor. In this case, the task remains unchanged.
You pass a pointer to the idx coordinate of the vector-valued function you provided to contiguous memory in column-major format.
The code example below demonstrates how to use the editor for providing values of a vector-valued function stored in two non-contiguous arrays:
#define NX 1000 /* number of break points */ #define NY 2 /* dimension of vector-valued function */ int main() { DFTaskPtr task; double x[NX]; double y1[NX], y2[NX]; /* vector-valued function is stored as two arrays */ /* Provide first coordinate of two-dimensional function y into creation routine */ status = dfdNewTask1D( &task, NX, x, DF_NON_UNIFORM_PARTITION, NY, y1, DF_1ST_COORDINATE ); /* Provide second coordiante of two–dimensional function */ status = dfdEditIdxPtr(task, DF_Y, 1, y2 ); ... }