#include <iostream>
#include <algorithm>
#include <limits.h>
#include <malloc.h>
Go to the source code of this file.
|
| #define | PTCMPXCH " cmpxchgq %2,%1\n" |
| |
| #define | newA(__E, __n) (__E*) malloc((__n)*sizeof(__E)) |
| |
|
| 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) |
| |
◆ newA
| #define newA |
( |
|
__E, |
|
|
|
__n |
|
) |
| (__E*) malloc((__n)*sizeof(__E)) |
◆ PTCMPXCH
| #define PTCMPXCH " cmpxchgq %2,%1\n" |