libsc  2.8.7
The SC library provides support for parallel scientific applications.
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Fields
sc_array Struct Reference

The sc_array object provides a dynamic array of equal-size elements. More...

#include <sc_containers.h>

Data Fields

size_t elem_size
 size of a single element
 
size_t elem_count
 number of valid elements
 
ssize_t byte_alloc
 number of allocated bytes or -(number of viewed bytes + 1) if this is a view: the "+ 1" distinguishes an array of size 0 from a view of size 0
 
char * array
 linear array to store elements
 

Detailed Description

The sc_array object provides a dynamic array of equal-size elements.

Elements are accessed by their 0-based index. Their address may change. The number of elements (== elem_count) of the array can be changed by sc_array_resize and sc_array_rewind. Elements can be sorted with sc_array_sort. If the array is sorted, it can be searched with sc_array_bsearch. A priority queue is implemented with pqueue_add and pqueue_pop (untested).


The documentation for this struct was generated from the following file: