Constructor
NumCosmoMathVectornew_data_malloc
Declaration [src]
NcmVector*
ncm_vector_new_data_malloc (
gdouble* d,
const gsize size,
const gsize stride
)
Description [src]
This function returns a NcmVector of the array d allocated using malloc.
It saves d internally and frees it when it is no longer necessary.
The d vector must not be freed.
Parameters
d-
Type: An array of
doublePointer to the first double allocated.
The data is owned by the caller of the function. size-
Type:
const gsizeNumber of doubles allocated.
stride-
Type:
const gsizeThe step-size from one element to the next in physical memory, measured in units of double.
Return value
Type: NcmVector
A new NcmVector.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |