Defines | Typedefs

K:/Projects/scplusplus/gpl_releases/nttw/include/global.h File Reference

Aliases/Globals Header/Object for the NTTW C Library. More...

#include <limits.h>
Include dependency graph for global.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NTTW_VERSION   0x000001
#define NTTW_VERSION_STR   "1.0.0"
#define NTTW_DLL_SYM
 DLL Function Symbol for Windows. It is empty for other OSes.
#define CACHE_ALIGN
 Align the integers to match SSE register sizes. UNUSED.
#define TRUE   1
 Define for True Boolean.
#define FALSE   0
 Define for False Boolean.
#define NTTW_FORWARD   -1
 Define for Forward transform of NTTs.
#define NTTW_INVERSE   1
 Define for Inverse transform of NTTs.
#define ALIGNOF(type)   __alignof__(type)
 Macro for determining the alignment of a variable. Cross platform.
#define MACHINE_MAX   LONG_MAX
 Define for the machine architecture type.
#define ROUND(x)   ( (x)>=0 ? (long)((x)+0.5) : (long)((x)-0.5) )
 Macro for rounding an floating point number.
#define IS64BITMODE   ( MACHINE_MAX>INT_MAX ? 1 : 0 )
 Macro for determining if 64-bit mode. Returns Boolean.
#define SWAP(a, b)   {a ^= b; b ^= a; a ^= b;}
 Macro for swapping the contents of two variables.
#define BITS   8*sizeof(long)
 Define for the number of bits of the local machine.
#define NTTW_INT_MAX   USHRT_MAX
#define NTTW_INT_MIN   0
#define NTTW_BIGINT_MAX   UINT_MAX
#define NTTW_BIGINT_MIN   0
#define FORMAT_INPUT_STR   "%hu"
#define FORMAT_OUTPUT_STR   "%hu "
#define FORMAT_CSVOUTPUT_STR   "%hu,"
#define FORMAT_BIG_OUTPUT_STR   "%u "
#define FORMAT_BIG_CSVOUTPUT_STR   "%u,"

Typedefs

typedef unsigned short nttw_integer
typedef float nttw_real
typedef unsigned nttw_big_integer

Detailed Description

Aliases/Globals Header/Object for the NTTW C Library.

NTTW Library Aliases

This header provides all the relevant macros, alaises and constants used in the library.

This file is part of NTTW Library.

NTTW is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

NTTW is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with NTTW. If not, see <http://www.gnu.org/licenses/>.

Author:
Shekhar S. Chandra, 2009

Definition in file global.h.


Define Documentation

#define ALIGNOF (   type  )     __alignof__(type)

Macro for determining the alignment of a variable. Cross platform.

Definition at line 115 of file global.h.

#define BITS   8*sizeof(long)

Define for the number of bits of the local machine.

Definition at line 144 of file global.h.

#define CACHE_ALIGN

Align the integers to match SSE register sizes. UNUSED.

Definition at line 75 of file global.h.

#define FALSE   0

Define for False Boolean.

Definition at line 90 of file global.h.

#define FORMAT_BIG_CSVOUTPUT_STR   "%u,"

Definition at line 215 of file global.h.

#define FORMAT_BIG_OUTPUT_STR   "%u "

Definition at line 212 of file global.h.

#define FORMAT_CSVOUTPUT_STR   "%hu,"

Definition at line 208 of file global.h.

#define FORMAT_INPUT_STR   "%hu"

Definition at line 202 of file global.h.

#define FORMAT_OUTPUT_STR   "%hu "

Definition at line 205 of file global.h.

#define IS64BITMODE   ( MACHINE_MAX>INT_MAX ? 1 : 0 )

Macro for determining if 64-bit mode. Returns Boolean.

Definition at line 132 of file global.h.

#define MACHINE_MAX   LONG_MAX

Define for the machine architecture type.

Definition at line 122 of file global.h.

#define NTTW_BIGINT_MAX   UINT_MAX

Definition at line 195 of file global.h.

#define NTTW_BIGINT_MIN   0

Definition at line 198 of file global.h.

#define NTTW_DLL_SYM

DLL Function Symbol for Windows. It is empty for other OSes.

Definition at line 67 of file global.h.

#define NTTW_FORWARD   -1

Define for Forward transform of NTTs.

Definition at line 98 of file global.h.

#define NTTW_INT_MAX   USHRT_MAX

Definition at line 188 of file global.h.

#define NTTW_INT_MIN   0

Definition at line 191 of file global.h.

#define NTTW_INVERSE   1

Define for Inverse transform of NTTs.

Definition at line 105 of file global.h.

#define NTTW_VERSION   0x000001

Definition at line 43 of file global.h.

#define NTTW_VERSION_STR   "1.0.0"

Definition at line 44 of file global.h.

#define ROUND (   x  )     ( (x)>=0 ? (long)((x)+0.5) : (long)((x)-0.5) )

Macro for rounding an floating point number.

Definition at line 127 of file global.h.

#define SWAP (   a,
  b 
)    {a ^= b; b ^= a; a ^= b;}

Macro for swapping the contents of two variables.

Definition at line 137 of file global.h.

#define TRUE   1

Define for True Boolean.

Definition at line 83 of file global.h.


Typedef Documentation

typedef unsigned nttw_big_integer

Definition at line 220 of file global.h.

typedef unsigned short nttw_integer

Definition at line 218 of file global.h.

typedef float nttw_real

Definition at line 219 of file global.h.