DS_EASY_ALLOC_ARRAY_FROM_ARRAY_DESC(3)

EXPERIMENTAL_FUNC
ds_easy_alloc_array_from_array_desc - Wrap a data structure around an array.

SYNOPSIS
#include <karma_ds.h>

multi_array * ds_easy_alloc_array_from_array_desc

(CONST array_desc *arr_desc, CONST array_pointer *arrayp, flag clear)

DESCRIPTION
This routine will "wrap" an externally allocated array by allocating the required descriptors. The array is NOT tiled nor are any address offsets computed. The data packet that may be stored in the array contains many atomic data.

arr_desc
    The array descriptor describing the array data.

arrayp
    The array data pointer. If this is NULL the array data is internally allocated.

clear
    If TRUE, then the routine will initialise (set to zero) all the data, if that data is internally allocated.

RETURN VALUE
A pointer the multi_array descriptor on success, else NULL.

Multi-threading Level
Unsafe.

NOTE
This routine does NOT create a Karma arrayfile. This must be done with a call to <-dsxfr_put_multi->.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/