GeNN  1.1
GPU enhanced Neuronal Networks (GeNN)
 All Classes Files Functions Variables Typedefs Macros Pages
simpleBit.h File Reference

Contains three macros that allow simple bit manipulations on an (presumably unsigned) 64 bit integer. More...

#include <cassert>
#include <cmath>

Go to the source code of this file.

Macros

#define SIMPLEBIT_H
 macro for avoiding multiple inclusion during compilation More...
 
#define B(x, i)   ((x) & (0x80000000 >> (i)))
 Extract the bit at the specified position i from x. More...
 
#define setB(x, i)   x= ((x) | (0x80000000 >> (i)))
 Set the bit at the specified position i in x to 1. More...
 
#define delB(x, i)   x= ((x) & (~(0x80000000 >> (i))))
 Set the bit at the specified position i in x to 0. More...
 

Detailed Description

Contains three macros that allow simple bit manipulations on an (presumably unsigned) 64 bit integer.

Macro Definition Documentation

#define B (   x,
 
)    ((x) & (0x80000000 >> (i)))

Extract the bit at the specified position i from x.

#define delB (   x,
 
)    x= ((x) & (~(0x80000000 >> (i))))

Set the bit at the specified position i in x to 0.

#define setB (   x,
 
)    x= ((x) | (0x80000000 >> (i)))

Set the bit at the specified position i in x to 1.

#define SIMPLEBIT_H

macro for avoiding multiple inclusion during compilation