LAL  7.5.0.1-08ee4f4

Detailed Description

Provides prototype and status code information for use of CreateVectorSequence and DestroyVectorSequence.

Synopsis

#include <lal/SeqFactories.h>

XLAL Functions

<vecseqtype> * XLALCreate<vecseqtype>(UINT4 length, UINT4 veclen);
void XLALCreate<vecseqtype>(<vecseqtype> *vecseq);
REAL4VectorSequence * XLALCreateVectorSequence(UINT4 length, UINT4 veclen)
uint32_t UINT4
Four-byte unsigned integer.
Sequence of REAL4 Vectors, see DATATYPE-VectorSequence types for more details.
Definition: LALDatatypes.h:331

Here <vecseqtype> is one of COMPLEX16VectorSequence, COMPLEX8VectorSequence, REAL8VectorSequence, REAL4VectorSequence, INT8VectorSequence, INT4VectorSequence, INT2VectorSequence, UINT8VectorSequence, UINT4VectorSequence, UINT2VectorSequence, or CHARVectorSequence.

Description

The XLALCreate<type>VectorSequence functions create vector sequences of type <type>, length and vector length veclen. The function XLALCreateVectorSequence is the same as XLALCreateREAL4VectorSequence.

The XLALDestroy<type>VectorSequence functions deallocate the memory allocation pointed to by vecseq including its contents. The function XLALDestroyVectorSequence is the same as XLALDestroyREAL4VectorSequence.

Return Values

The create functions return a pointer to the created vector sequence if successful; upon failure they will return NULL and set xlalErrno to one of the following values: XLAL_ENOMEM if memory allocation failed, or XLAL_EBADLEN if the requested length or veclen is zero.

The destroy functions do not have a return value. They can fail if they are passed a NULL pointer, in which case xlalErrno is set to XLAL_EFAULT, or if the vector sequency passed to the destroy routine has zero length, vector length, or NULL data pointer then xlalErrno is set to XLAL_EINVAL.

Modules

 Module ArraySequenceFactories.c
 Create/destroy <datatype>ArraySequence objects.
 
 Module VectorSequenceFactories.c
 Create/destroy <datatype>VectorSequence objects.
 

Data Structures

struct  CreateVectorSequenceIn
 This structure stores the input required for creating a vector sequence. More...
 
struct  CreateArraySequenceIn
 This structure stores the input required for creating an array sequence. More...
 

Files

file  ArraySequenceFactoriesTest.c
 A program to test create/destroy array sequence routines.
 
file  VectorSequenceFactoriesTest.c
 A program to test create/destroy vector sequence routines.
 

Error Codes

#define SEQFACTORIESH_ESLENGTH   1
 Illegal sequence length. More...
 
#define SEQFACTORIESH_EVLENGTH   2
 Illegal vector length. More...
 
#define SEQFACTORIESH_EALENGTH   4
 Illegal array dimension. More...
 
#define SEQFACTORIESH_EVPTR   8
 Null sequence handle. More...
 
#define SEQFACTORIESH_EUPTR   16
 Non-null sequence pointer. More...
 
#define SEQFACTORIESH_EDPTR   32
 Null sequence data. More...
 
#define SEQFACTORIESH_EINPTR   64
 Null input pointer. More...
 
#define SEQFACTORIESH_EMALLOC   128
 Malloc failure. More...
 

Macro Definition Documentation

◆ SEQFACTORIESH_ESLENGTH

#define SEQFACTORIESH_ESLENGTH   1

Illegal sequence length.

Definition at line 78 of file SeqFactories.h.

◆ SEQFACTORIESH_EVLENGTH

#define SEQFACTORIESH_EVLENGTH   2

Illegal vector length.

Definition at line 79 of file SeqFactories.h.

◆ SEQFACTORIESH_EALENGTH

#define SEQFACTORIESH_EALENGTH   4

Illegal array dimension.

Definition at line 80 of file SeqFactories.h.

◆ SEQFACTORIESH_EVPTR

#define SEQFACTORIESH_EVPTR   8

Null sequence handle.

Definition at line 81 of file SeqFactories.h.

◆ SEQFACTORIESH_EUPTR

#define SEQFACTORIESH_EUPTR   16

Non-null sequence pointer.

Definition at line 82 of file SeqFactories.h.

◆ SEQFACTORIESH_EDPTR

#define SEQFACTORIESH_EDPTR   32

Null sequence data.

Definition at line 83 of file SeqFactories.h.

◆ SEQFACTORIESH_EINPTR

#define SEQFACTORIESH_EINPTR   64

Null input pointer.

Definition at line 84 of file SeqFactories.h.

◆ SEQFACTORIESH_EMALLOC

#define SEQFACTORIESH_EMALLOC   128

Malloc failure.

Definition at line 85 of file SeqFactories.h.