libftsh
A Fast Transform for Spherical Harmonics
 All Data Structures Files Functions Variables Defines
Defines | Functions
dvect.c File Reference

Contains simple functions based on the Dense_Vector struct. More...

#include "libftsh.h"

Defines

#define ENTEREXIT   0

Functions

Dense_Vector init_dvect_memory (unsigned int n)
void give_dvect_memory (Dense_Vector *current, Dense_Vector *previous)

Detailed Description

Contains simple functions based on the Dense_Vector struct.

Summary:

Notes:


Function Documentation

void give_dvect_memory ( Dense_Vector current,
Dense_Vector previous 
)

This routine sets up memory for the next Dense_Vector we wish to use. It looks at the previous Dense_Vector we used, and increments fields

INPUT: previous -- the last Dense_Vector we used

OUTPUT: current -- the Dense_Vector we wish to use next We align current->vector to the first space not used by previous->vector, and set current->max_size to account for the amount used in previous.

Here is the caller graph for this function:

Dense_Vector init_dvect_memory ( unsigned int  n)

This routine gets a large amount of memory for Dense_Vector's, and gives it to a single Dense_Vector to hold. This special Dense_Vector acts as a pointer to this block of memory, and also keeps track of how large this memory is.

INPUT: n -- the amount of memory to get

OUPUT: returns a Dense_Vector with

  • .max_size=n
  • .n_row=0
  • .vector pointing to memory for n REAL's

Here is the caller graph for this function: