The "iarray" Package

These routines provide a simple interface to the recursive, heirarchical data structure supported in Karma, when only n-dimensional data is to be represented.

Library: karma
Link With: -lkarma

Functions

iarray_num_dimGet number of dimensions in an Intelligent Array
iarray_typeGet type of data in an Intelligent Array
iarray_value_nameGet name of data in an Intelligent Array
iarray_register_destroy_funcRegister destroy function for an Intelligent Array
iarray_contourExtract contours from a 2-dimensional Intelligent Array.
iarray_get_image_from_multiGet an image from a Karma data structure.
iarray_get_movie_from_multiGet a movie from a Karma data structure.
iarray_read_nDRead in a Karma arrayfile and yield an "Intelligent Array".
iarray_writeWrite an "Intelligent Array" in the Karma data format.
iarray_createCreate an Intelligent Array.
iarray_get_from_multi_arrayCreate an Intelligent Array from a Karma data structure.
iarray_create_from_array_descCreate an Intelligent Array from a preallocated nD array.
iarray_deallocDeallocate an Intelligent Array.
iarray_put_named_valueAttach a data value to an Intelligent Array.
iarray_put_named_stringAttach a string to an Intelligent Array.
iarray_get_named_valueGet attached data from an Intelligent Array.
iarray_get_named_stringGet attached string from an Intelligent Array.
iarray_get_sub_array_2DCreate a 2-dimensional alias Intelligent Array.
iarray_get_2D_slice_from_3DCreate a 2-dimensional Intelligent Array alias from a slice.
iarray_get_sub_array_3DCreate a 3-dimensional alias Intelligent Array.
iarray_remap_torusRemap Intelligent Array into a torus.
iarray_dim_lengthGet length of a dimension in an Intelligent Array.
iarray_dim_nameGet dimension name in an Intelligent Array.
iarray_set_world_coordsSet the world co-ordinates of an Intelligent Array dimension.
iarray_get_world_coordsGet the world co-ordinates of an Intelligent Array dimension.
iarray_get_dim_descGet a dimension descriptor from an Intelligent Array.
iarray_get_restrictionsGet restriction information.
iarray_copy_dataCopy data between Intelligent Arrays.
iarray_fillFill an Intelligent Array with a single value.
iarray_min_maxDetermine the minimum and maximum value of an Intelligent Array.
iarray_scale_and_offsetScale and offset an Intelligent Array.
iarray_clip_scale_and_offsetClip, scale and offset an Intelligent Array.
iarray_add_and_scaleAdd Intelligent Arrays and scale.
iarray_sub_and_scaleSubtract Intelligent Arrays and scale.
iarray_compute_histogramCompute a histogram of an "Intelligent Array".
iarray_sumDetermine the sum of an Intelligent Array.
iarray_dim_indexThis routine will find the index of a named dimension.
iarray_get_data_scalingGet the scale and offset for data in an Intelligent Array.
iarray_set_data_scalingSet the scale and offset for data in an Intelligent Array.
iarray_get_data_rangeGet the range of data in an Intelligent Array.
iarray_set_data_rangeSet the range of data in an Intelligent Array.
iarray_format_valueFormat a data value into a string.
iarray_create_from_templateCreate an Intelligent Array from a template array.
iarray_get_coordinateGet a co-ordinate along a dimension.
iarray_set_dim_nameChange the name of a dimension of an Intelligent Array.
iarray_append_history_stringAdd a history string to an Intelligent Array.
iarray_copy_named_elementCopy a named element from one Intelligent Array to another.
iarray_get_fits_axisGet the FITS axis number of a dimension.
iarray_create_and_setupCreate an Intelligent Array and setup.
iarray_get_associated_wcs_astroGet the KwcsAstro object associated with an Intelligent Array.
iarray_set_value_nameChange the data name of an Intelligent Array.
iarray_find_centroidFind the centroid inside an ellipse.
iarray_write_mono_psWrite an Intelligent Array as monochrome PostScript.
iarray_write_pseudocolour_psWrite an Intelligent Array as PseudoColour PostScript.
iarray_write_rgb_psWrite an Intelligent Array as TrueColour PostScript.
iarray_rect_to_polarTransform an image from rectangular to polar co-ordinates.
iarray_create_1DCreate a 1-dimensional Intelligent Array.
iarray_create_2DCreate a 2-dimensional Intelligent Array.
iarray_create_3DCreate a 3-dimensional Intelligent Array.
iarray_create_4DCreate a 4-dimensional Intelligent Array.
iarray_create_shmCreate an n-dimensional Intelligent Array in shared memory.
iarray_put_doubleAttach a double precision data value to an Intelligent Array.
iarray_put_floatAttach a float data value to an Intelligent Array.
iarray_put_intAttach an integer data value to an Intelligent Array.
iarray_get_doubleGet attached double float from an Intelligent Array.
iarray_get_floatGet attached float from an Intelligent Array.
iarray_get_intGet attached integer from an Intelligent Array.
iarray_fill_doubleFill an Intelligent Array with a double precision float value.
iarray_fill_floatFill an Intelligent Array with a single float value.
iarray_fill_intFill an Intelligent Array with a single integer value.
iarray_min_max_floatDetermine the minimum and maximum value of an Intelligent Array.
iarray_min_max_intDetermine the minimum and maximum value of an Intelligent Array.
iarray_scale_and_offset_floatScale and offset an Intelligent Array.
iarray_scale_and_offset_intScale and offset an Intelligent Array.

Prototype Functions

iarray_PROTO_destroy_funcRegister destruction of an Intelligent Array.
iarray_PROTO_destroy_funcRegister destruction of an Intelligent Array.


Functions


unsigned int iarray_num_dim (iarray array)

Get number of dimensions in an Intelligent Array

Parameters:

Returns: The number of dimensions.
Multithreading Level: Unsafe


unsigned int iarray_type (iarray array)

Get type of data in an Intelligent Array

Parameters:

Returns: The type of the data in the array.
Multithreading Level: Unsafe


CONST char * iarray_value_name (iarray array)

Get name of data in an Intelligent Array

Parameters:

Returns: The name of the data in the array.
Multithreading Level: Unsafe


KCallbackFunc iarray_register_destroy_func (iarray array, void (*destroy_func) (iarray array, void *info), void *info)

Register destroy function for an Intelligent Array.

Parameters:

Returns: The name of the data in the array.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void iarray_contour (iarray array, unsigned int num_levels, CONST double *contour_levels, uaddr *buffer_sizes, uaddr size_stride, double **x0_arr, double **y0_arr, double **x1_arr, double **y1_arr, uaddr *num_segments, uaddr seg_stride)

This routine will extract contours from a 2-dimensional Intelligent Array, producing a list of line segments that approximate the countours. The co-ordinates of the line segments are in linear world co-ordinates.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


flag iarray_get_image_from_multi (multi_array *multi_desc, iarray *pseudo, iarray *red, iarray *green, iarray *blue, unsigned int *cmap_index)

This routine will find an image embedded in a Karma data structure. The image may be single-channel (PseudoColour) or it may be a TrueColour image (red, green and blue components).

Parameters:

Returns: TRUE on succes, else FALSE.
Multithreading Level: Unsafe


flag iarray_get_movie_from_multi (multi_array *multi_desc, iarray *pseudo, iarray *red, iarray *green, iarray *blue, unsigned int *cmap_index)

This routine will find a movie embedded in a Karma data structure. The movie may be single-channel (PseudoColour) or it may be a TrueColour movie (red, green and blue components).

Parameters:

Returns: TRUE on succes, else FALSE.
Multithreading Level: Unsafe


iarray iarray_read_nD (CONST char *object, flag cache, CONST char *arrayname, unsigned int num_dim, CONST char **dim_names, CONST char *elem_name, unsigned int mmap_option)

Read in a Karma arrayfile and yield an "Intelligent Array".

Parameters:

Returns: A dynamically allocated intelligent array on success, else an error message is printed to the standard output and NULL is returned.
Multithreading Level: Unsafe


flag iarray_write (iarray array, CONST char *arrayfile)

Write an "Intelligent Array" in the Karma data format.

Parameters:

Returns: TRUE on success, else an error message is printed to the standard output and FALSE is returned.
Multithreading Level: Unsafe


iarray iarray_create (unsigned int type, unsigned int num_dim, CONST char **dim_names, CONST unsigned long *dim_lengths, CONST char *elem_name, iarray old_array)

This routine will create an "Intelligent Array", using the Karma general data structure format as the underlying data format. If the environment variable "IARRAY_ALLOC_DEBUG" is set to "TRUE" then the routine will print allocation debugging information.

Parameters:

Returns: A dynamically allocated intelligent array on success, else an error message is printed to the standard output and NULL is returned.
Multithreading Level: Unsafe


iarray iarray_get_from_multi_array (multi_array *multi_desc, CONST char *arrayname, unsigned int num_dim, CONST char **dim_names, CONST char *elem_name)

This routine will yield an "Intelligent Array" from a multi array Karma general data structure. The routine searches for a n-dimensional array with a single atomic element at each point in multi-dimensional space

Parameters:

Returns: A dynamically allocated intelligent array on success, else an error message is printed to the standard output and NULL is returned.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

iarray iarray_create_from_array_desc (array_desc *arr_desc, CONST array_pointer *arrayp, unsigned int elem_index)

Create an Intelligent Array from a preallocated nD array.

Parameters:

Returns: A dynamically allocated intelligent array on success, else an error message is printed to the standard output and NULL is returned.
Multithreading Level: Unsafe


void iarray_dealloc (iarray array)

This routine will deallocate an "Intelligent Array". If the environment variable "IARRAY_ALLOC_DEBUG" is set to "TRUE" then the routine will print deallocation debugging information.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


flag iarray_put_named_value (iarray array, CONST char *name, unsigned int type, double value[2])

This routine will add a unique named value to the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag iarray_put_named_string (iarray array, CONST char *name, CONST char *string)

This routine will add a unique named string to the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag iarray_get_named_value (iarray array, CONST char *name, unsigned int *type, double value[2])

This routine will get a unique named value from the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


char * iarray_get_named_string (iarray array, CONST char *name)

This routine will get a unique named string from the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: A pointer to a dynamically allocated copy of the string on success, else NULL.
Multithreading Level: Unsafe


iarray iarray_get_sub_array_2D (iarray array, int starty, int startx, unsigned int ylen, unsigned int xlen)

This routine will create an "Intelligent Array" which is an alias or a sub-array of another "Intelligent Array". Subsequent modification of the alias array will modify the data of the original array. Sub-arrays may be created from other sub-arrays. The attachment count of the underlying multi_array data structure is incremented on successful completion.

Parameters:

Returns: A dynamically allocated intelligent array on success, else NULL.
Multithreading Level: Unsafe
Note:


iarray iarray_get_2D_slice_from_3D (iarray cube, unsigned int ydim, unsigned int xdim, unsigned int slice_pos)

This routine will create a 2-D "Intelligent Array" which is an alias of an arbitrary slice of a 3-D array.

Parameters:

Returns: A dynamically allocated intelligent array on success, else NULL.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

iarray iarray_get_sub_array_3D (iarray array, int startz, int starty, int startx, unsigned int zlen, unsigned int ylen, unsigned int xlen)

This routine will create an "Intelligent Array" which is an alias or a sub-array of another "Intelligent Array". Subsequent modification of the alias array will modify the data of the original array. Sub-arrays may be created from other sub-arrays. The attachment count of the underlying multi_array data structure is incremented on successful completion.

Parameters:

Returns: A dynamically allocated intelligent array on success, else NULL.
Multithreading Level: Unsafe
Note:


void iarray_remap_torus (iarray array, unsigned int boundary_width)

This routine will remap an N-dimensional "Intelligent Array" to a pseudo-toroidal array.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


unsigned long iarray_dim_length (iarray array, unsigned int index)

Get length of a dimension in an Intelligent Array.

Parameters:

Returns: The length of the specified dimension.
Multithreading Level: Unsafe


CONST char * iarray_dim_name (iarray array, unsigned int index)

This routine will get the name of a specified dimension in a simple, n-dimensional array.

Parameters:

Returns: A pointer to the name of the specified dimension.
Multithreading Level: Unsafe


void iarray_set_world_coords (iarray array, unsigned int index, double first, double last)

Set the world co-ordinates of an Intelligent Array dimension.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


void iarray_get_world_coords (iarray array, unsigned int index, double *first, double *last)

Get the world co-ordinates of an Intelligent Array dimension.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


dim_desc * iarray_get_dim_desc (iarray array, unsigned int index)

Get a dimension descriptor from an Intelligent Array.

Parameters:

Returns: A pointer to the dimension descriptor.
Multithreading Level: Unsafe


unsigned int iarray_get_restrictions (iarray array, char ***restr_names, double **restr_values)

This routine will get any associated restrictions for an Intelligent Array. The routine will dynamically allocate space for the restriction data, which must be externally freed.

Parameters:

Returns: The number of restrictions. This may be 0.
Multithreading Level: Unsafe


flag iarray_copy_data (iarray output, iarray input, flag magnitude)

This routine will copy data from one "Intelligent Array" to another. The sizes of the two arrays must be identical. The routine can deal with the types of the two arrays being different

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


flag iarray_fill (iarray array, double value[2])

Fill an Intelligent Array with a single value.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag iarray_min_max (iarray array, unsigned int conv_type, double *min, double *max)

Determine the minimum and maximum value of an Intelligent Array.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe.


flag iarray_scale_and_offset (iarray out, iarray inp, double scale[2], double offset[2], flag magnitude)

This routine will perform a scale and offset on every element in an "Intelligent Array" (output = input * scale + offset).

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

flag iarray_clip_scale_and_offset (iarray out, iarray inp, double scale, double offset, double lower_clip, double upper_clip, flag blank)

This routine will perform a clipping operation followed by a scale and offset on every element in an "Intelligent Array". The operation following the clipping is: (output = input * scale + offset).

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


flag iarray_add_and_scale (iarray out, iarray inp1, iarray inp2, double scale[2], flag magnitude)

This routine will add two "Intelligent Array" to each other and scales the result. The sizes of the two input arrays and the output must be identical. The routine performs the following computation: OUT = INP1 + INP2 * scale The routine will automatically perform type conversions if necessary.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


flag iarray_sub_and_scale (iarray out, iarray inp1, iarray inp2, double scale[2], flag magnitude)

This routine will subtract two "Intelligent Array" from each other and scales the result. The sizes of the two input arrays and the output must be identical. The routine performs the following computation: OUT = INP1 - INP2 * scale The routine will automatically perform type conversions if necessary.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


flag iarray_compute_histogram (iarray array, unsigned int conv_type, double min, double max, unsigned long num_bins, unsigned long *histogram_array, unsigned long *histogram_peak, unsigned long *histogram_mode)

Compute a histogram of an "Intelligent Array".

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe.


flag iarray_sum (iarray array, double sum[2])

Determine the sum of an Intelligent Array.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe.


unsigned int iarray_dim_index (iarray array, CONST char *name)

This routine will find the index of a named dimension.

Parameters:

Returns: The dimension index if found, else the number of dimension in the array is returned.
Multithreading Level: Unsafe


flag iarray_get_data_scaling (iarray array, double *scale, double *offset)

This routine will determine the scale and offset for data in an Intelligent Array. This may be important when a floating-point array has been converted to an integer array to save space. Scaling information should be attached to the array so that the original data values may be reconstructed (aside from quantisation effects). The following expression may be used to convert scaled values to real values: (output = input * scale + offset). The scaling and offset values should previously have been attached to the Intelligent Array using the iarray_set_data_scaling routine.

Parameters:

Returns: TRUE if either the scaling or offset value were found, else FALSE
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag iarray_set_data_scaling (iarray array, double scale, double offset)

This routine will set the scale and offset for data in an Intelligent Array. This may be important when a floating-point array has been converted to an integer array to save space. The scaling information will be attached to the array so that the original data values may be reconstructed (aside from quantisation effects). The following expression may be used to convert scaled values to real values: (output = input * scale + offset).

Parameters:

Returns: TRUE if the scaling information is different from what was already attached to the array, else FALSE.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag iarray_get_data_range (iarray array, double *minimum, double *maximum)

This routine will determine the range of data in an Intelligent Array. Range information should be attached to the header.

Parameters:

Returns: TRUE if either the minimum or maximum value were found, else FALSE
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag iarray_set_data_range (iarray array, double minimum, double maximum)

This routine will set the range of data in an Intelligent Array. The range information will be attached to the header.

Parameters:

Returns: TRUE if the range information is different from what was already attached to the array, else FALSE.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void iarray_format_value (iarray array, char string[STRING_LENGTH], double value, double scale, double offset)

Format a data value into a string.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


iarray iarray_create_from_template (iarray template_arr,unsigned int elem_type, flag copy_world_coords, flag copy_names, flag copy_aux_info)

This routine will create an Intelligent Array of a specified type using an existing Intelligent Array as the template for the size, dimensionality and other attributes.

Parameters:

Returns: An Intelligent Array on success, else NULL.
Multithreading Level: Unsafe


double iarray_get_coordinate (iarray array, unsigned int dim_index, double coord_index)

Get a co-ordinate along a dimension.

Parameters:

Returns: The co-ordinate on success, else TOOBIG.
Multithreading Level: Unsafe


void iarray_set_dim_name (iarray array, unsigned int index, CONST char *name, flag new_alloc)

Change the name of a dimension of an Intelligent Array.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


flag iarray_append_history_string (iarray array, CONST char *string, flag new_alloc)

Add a history string to an Intelligent Array.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag iarray_copy_named_element (iarray out, iarray in, CONST char *name, flag fail_if_not_found, flag fail_on_duplicate, flag replace)

Copy a named element from one Intelligent Array to another.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


unsigned int iarray_get_fits_axis (iarray array, unsigned int index)

Get the FITS axis number of a dimension.

Parameters:

Returns: The FITS axis number on success, else 0.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag iarray_create_and_setup (iarray *array, multi_array *multi_desc, flag inform, unsigned int num_dim, unsigned int required_type, double *min, double *max, flag discard_zero_range, KwcsAstro *ap)

This routine will attempt to guess the filetype of a file and in the file, converting to an Intelligent Array if possible. The routine then performs some simple checks and some other convenience functions.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KwcsAstro iarray_get_associated_wcs_astro (iarray array)

Get the KwcsAstro object associated with an Intelligent Array.

Parameters:

Returns: The KwcsAstro object if associated, else NULL.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void iarray_set_value_name (iarray array, CONST char *name, flag new_alloc)

Change the data name of an Intelligent Array.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag iarray_find_centroid (iarray array, double *background, flag *inverted, double *xpos, uaddr xradius, double *ypos, uaddr yradius)

This routine will search for the centroid of an object inside a specified ellipse.

Parameters:

Returns: TRUE on succes, else FALSE.
Multithreading Level: Unsafe
Note:


flag iarray_write_mono_ps (iarray image, PostScriptPage pspage, double xstart, double ystart, double xend, double yend, flag iscale)

This routine will convert a 2-dimensional Intelligent Array to monochrome PostScript. The routine does NOT write PostScript headers or tails.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag iarray_write_pseudocolour_ps (iarray image, PostScriptPage pspage, double xstart, double ystart, double xend, double yend, unsigned short *cmap,unsigned int cmap_size)

This routine will convert a 2-dimensional Intelligent Array to colour PostScript. The routine does NOT write PostScript headers or tails.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag iarray_write_rgb_ps (iarray image_red, iarray image_green, iarray image_blue, PostScriptPage pspage, double xstart, double ystart, double xend, double yend)

This routine will convert three 2-dimensional Intelligent Arrays to colour PostScript. The routine does NOT write PostScript headers or tails.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

void iarray_rect_to_polar (iarray out, iarray in, double centre_x, double centre_y, double radius_major, double radius_minor, double rotation)

This routine will transform an input image with a rectangular co-ordinate system to an output image with a polar co-ordinate system. Lines of constant radius in the output image correspond to the points around an ellipse in the input image. The X axis in the output image will correspond to different radii bins, while the Y axis will correspond to different angle bins. The last X axis index will correspond to the outer ellipse.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


iarray iarray_create_1D (unsigned long xlen, unsigned int type)

This routine will create a 1-dimensional "Intelligent Array", using the Karma general data structure format as the underlying data format

Parameters:

Returns: A dynamically allocated intelligent array on success, else NULL.
Multithreading Level: Unsafe
Note:


iarray iarray_create_2D (unsigned long ylen, unsigned long xlen, unsigned int type)

This routine will create a 2-dimensional "Intelligent Array", using the Karma general data structure format as the underlying data format

Parameters:

Returns: A dynamically allocated intelligent array on success, else NULL.
Multithreading Level: Unsafe
Note:


iarray iarray_create_3D (unsigned long zlen, unsigned long ylen, unsigned long xlen, unsigned int type)

This routine will create a 3-dimensional "Intelligent Array", using the Karma general data structure format as the underlying data format

Parameters:

Returns: A dynamically allocated intelligent array on success, else NULL.
Multithreading Level: Unsafe
Note:


iarray iarray_create_4D (unsigned long zlen, unsigned long ylen, unsigned long xlen, unsigned int wlen, unsigned int type)

This routine will create a 4-dimensional "Intelligent Array", using the Karma general data structure format as the underlying data format

Parameters:

Returns: A dynamically allocated intelligent array on success, else NULL.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

iarray iarray_create_shm (unsigned int type, unsigned int num_dim, CONST char **dim_names, CONST uaddr *dim_lengths, CONST char *elem_name, flag force)

Create an n-dimensional Intelligent Array in shared memory.

Parameters:

Returns: A dynamically allocated intelligent array on success, else NULL.
Multithreading Level: Unsafe


flag iarray_put_double (iarray array, CONST char *name, double value)

This routine will put a unique named float value into the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag iarray_put_float (iarray array, CONST char *name, float value)

This routine will put a unique named float value into the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag iarray_put_int (iarray array, CONST char *name, int value)

This routine will put a unique named integer value into the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag iarray_get_double (iarray array, CONST char *name, double *value, flag abort_on_error)

This routine will get a unique named double precision floating point value from the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


float iarray_get_float (iarray array, CONST char *name)

This routine will get a unique named float value from the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: The value on success, else the process is aborted on error.
Multithreading Level: Unsafe


int iarray_get_int (iarray array, CONST char *name)

This routine will get a unique named integer value from the underlying Karma general data structure of an "Intelligent Array".

Parameters:

Returns: The value on success, else the process is aborted on error.
Multithreading Level: Unsafe


flag iarray_fill_double (iarray array, double value)

Fill an Intelligent Array with a double precision float value.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


flag iarray_fill_float (iarray array, float value)

Fill an Intelligent Array with a single float value.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


flag iarray_fill_int (iarray array, int value)

Fill an Intelligent Array with a single integer value.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


flag iarray_min_max_float (iarray array, float *min, float *max)

Determine the minimum and maximum value of an Intelligent Array.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe.
Note:


flag iarray_min_max_int (iarray array, int *min, int *max)

Determine the minimum and maximum value of an Intelligent Array.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe.
Note:


flag iarray_scale_and_offset_float (iarray out, iarray inp, float scale, float offset)

This routine will perform a scale and offset on every element in an "Intelligent Array" (output = input * scale + offset).

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


flag iarray_scale_and_offset_int (iarray out, iarray inp, int scale,int offset)

This routine will perform a scale and offset on every element in an "Intelligent Array" (output = input * scale + offset).

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


Prototype Functions


void iarray_PROTO_destroy_func (iarray array, void *info)

Register destruction of an Intelligent Array.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


KCallbackFunc iarray_PROTO_destroy_func (iarray array, void *info)

Register destruction of an Intelligent Array.

Parameters:

Returns: A KCallbackFunc on success. On failure, the process aborts.
Multithreading Level: Unsafe


Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services