Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

onstack.h File Reference

#include <alloca.h>

Go to the source code of this file.


Defines

#define ALLOC_ONSTACK(name, type, nelems)   type *const name = (type *) malloc((nelems) * sizeof(type))
#define FREE_ONSTACK(name)   free(name)

Define Documentation

#define ALLOC_ONSTACK name,
type,
nelems       type *const name = (type *) malloc((nelems) * sizeof(type))
 

This file provides definitions which allow us to "allocate" arrays on the stack where possible. (Where not possible, malloc and free are used.)

The macro ALLOC_ONSTACK(name, type, nelems) is used to declare an array of 'type' named 'name' which is 'nelems' long. FREE_ONSTACK(name) is placed at the end of the scope of 'name' to call 'free' if necessary.

The macro ALLOC_ONSTACK wraps a call to alloca() on most systems.

Definition at line 63 of file onstack.h.

Referenced by nc_copy_var(), nc_get_var_double(), nc_get_var_float(), nc_get_var_int(), nc_get_var_long(), nc_get_var_schar(), nc_get_var_short(), nc_get_var_text(), nc_get_var_uchar(), nc_get_vara_double(), nc_get_vara_float(), nc_get_vara_int(), nc_get_vara_long(), nc_get_vara_schar(), nc_get_vara_short(), nc_get_vara_text(), nc_get_vara_uchar(), nc_put_var_double(), nc_put_var_float(), nc_put_var_int(), nc_put_var_long(), nc_put_var_schar(), nc_put_var_short(), nc_put_var_text(), nc_put_var_uchar(), nc_put_vara_double(), nc_put_vara_float(), nc_put_vara_int(), nc_put_vara_long(), nc_put_vara_schar(), nc_put_vara_short(), nc_put_vara_text(), nc_put_vara_uchar(), NCrecget(), and NCrecput().

#define FREE_ONSTACK name       free(name)
 

Definition at line 66 of file onstack.h.

Referenced by nc_copy_var(), nc_get_var_double(), nc_get_var_float(), nc_get_var_int(), nc_get_var_long(), nc_get_var_schar(), nc_get_var_short(), nc_get_var_text(), nc_get_var_uchar(), nc_get_vara_double(), nc_get_vara_float(), nc_get_vara_int(), nc_get_vara_long(), nc_get_vara_schar(), nc_get_vara_short(), nc_get_vara_text(), nc_get_vara_uchar(), nc_put_var_double(), nc_put_var_float(), nc_put_var_int(), nc_put_var_long(), nc_put_var_schar(), nc_put_var_short(), nc_put_var_text(), nc_put_var_uchar(), nc_put_vara_double(), nc_put_vara_float(), nc_put_vara_int(), nc_put_vara_long(), nc_put_vara_schar(), nc_put_vara_short(), nc_put_vara_text(), nc_put_vara_uchar(), NCrecget(), and NCrecput().

 

Powered by Plone

This site conforms to the following standards: