COMBINATORIAL_BLAS  1.6
utils.h File Reference
#include <iostream>
#include <algorithm>
#include <limits.h>
#include <malloc.h>

Go to the source code of this file.

Classes

struct  utils::identityF< E >
 
struct  utils::addF< E >
 
struct  utils::absF< E >
 
struct  utils::zeroF< E >
 
struct  utils::maxF< E >
 
struct  utils::minF< E >
 
struct  utils::firstF< E1, E2 >
 
struct  utils::secondF< E1, E2 >
 

Namespaces

 utils
 

Macros

#define PTCMPXCH   " cmpxchgq %2,%1\n"
 
#define newA(__E, __n)   (__E*) malloc((__n)*sizeof(__E))
 

Functions

unsigned int utils::hash (unsigned int a)
 
int utils::hashInt (unsigned int a)
 
unsigned int utils::hash2 (unsigned int a)
 
bool utils::LCAS (long *ptr, long oldv, long newv)
 
bool utils::SCAS (int *ptr, int oldv, int newv)
 
template<class ET >
bool utils::CAS (ET *ptr, ET oldv, ET newv)
 
template<class ET >
bool utils::CAS_GCC (ET *ptr, ET oldv, ET newv)
 
template<class ET >
ET utils::fetchAndAdd (ET *a, ET b)
 
template<class ET >
void utils::writeAdd (ET *a, ET b)
 
template<class ET >
bool utils::writeMax (ET *a, ET b)
 
template<class ET >
bool utils::writeMin (ET *a, ET b)
 
template<class ET >
bool utils::writeMin (ET **a, ET *b)
 

Macro Definition Documentation

◆ newA

#define newA (   __E,
  __n 
)    (__E*) malloc((__n)*sizeof(__E))

Definition at line 42 of file utils.h.

◆ PTCMPXCH

#define PTCMPXCH   " cmpxchgq %2,%1\n"

Definition at line 32 of file utils.h.