BitPunch McEliece  v0.0.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
permtypes.c File Reference
#include "permtypes.h"
#include <bitpunch/debugio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

void BPU_permFree (BPU_T_Perm_Vector **p)
 Free dynamically or statically alocated permutation vector. More...
 
int BPU_permMalloc (BPU_T_Perm_Vector **p, int size)
 Allocate permutation vector elements of size size. More...
 

Function Documentation

void BPU_permFree ( BPU_T_Perm_Vector **  p)

Free dynamically or statically alocated permutation vector.

Free dynamically or statically alocated permutation vector.

Parameters
ppermutation to free
is_dyn0 - staticaly allocated BPU_T_Perm_Vector object or 1 when dynamically

Definition at line 27 of file permtypes.c.

int BPU_permMalloc ( BPU_T_Perm_Vector **  p,
int  size 
)

Allocate permutation vector elements of size size.

Allocate permutation vector elements of size size using malloc. After work you have to free memory using call BPU_freePerm(p)

Parameters
pvector to be allocated
sizesize, permutation len
Returns
on succes 0 else error

Definition at line 35 of file permtypes.c.