MCPcopy Create free account
hub / github.com/creatale/node-dv / create2dFloatArray

Function create2dFloatArray

deps/leptonica/src/kernel.c:498–513  ·  view source on GitHub ↗

----------------------------------------------------------------------* * Helper function * *----------------------------------------------------------------------*/ ! * \brief create2dFloatArray() * * \param[in] sy rows == height * \param[in] sx columns == width * \return doubly indexed array i.e., an array of sy row pointers,

Source from the content-addressed store, hash-verified

496 * </pre>
497 */
498l_float32 **
499create2dFloatArray(l_int32 sy,
500 l_int32 sx)
501{
502l_int32 i;
503l_float32 **array;
504
505 PROCNAME("create2dFloatArray");
506
507 if ((array = (l_float32 **)LEPT_CALLOC(sy, sizeof(l_float32 *))) == NULL)
508 return (l_float32 **)ERROR_PTR("ptr array not made", procName, NULL);
509
510 for (i = 0; i < sy; i++)
511 array[i] = (l_float32 *)LEPT_CALLOC(sx, sizeof(l_float32));
512 return array;
513}
514
515
516/*----------------------------------------------------------------------*

Callers 1

kernelCreateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected