GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
bitmap.h
Go to the documentation of this file.
1 
6 #ifndef GHOST_BITMAP_H
7 #define GHOST_BITMAP_H
8 
9 #include "config.h"
10 #include "types.h"
11 #include "error.h"
12 #include <hwloc/bitmap.h>
13 #include <hwloc.h>
14 
18 typedef hwloc_bitmap_t ghost_bitmap;
19 
20 #define ghost_bitmap_set(bitmap,idx) hwloc_bitmap_set(bitmap,idx)
21 #define ghost_bitmap_set_range(bitmap,start,end) hwloc_bitmap_set_range(bitmap,start,end)
22 #define ghost_bitmap_clr_range(bitmap,start,end) hwloc_bitmap_clr_range(bitmap,start,end)
23 #define ghost_bitmap_list_asprintf(str,bitmap) hwloc_bitmap_list_asprintf(str,bitmap)
24 #define ghost_bitmap_copy(dst,src) hwloc_bitmap_copy(dst,src)
25 #define ghost_bitmap_clr(bitmap,idx) hwloc_bitmap_clr(bitmap,idx)
26 #define ghost_bitmap_first(bitmap) hwloc_bitmap_first(bitmap)
27 #define ghost_bitmap_next(bitmap,idx) hwloc_bitmap_next(bitmap,idx)
28 #define ghost_bitmap_alloc(bitmap) hwloc_bitmap_alloc(bitmap)
29 #define ghost_bitmap_free(bitmap) hwloc_bitmap_free(bitmap)
30 #define ghost_bitmap_isset(bitmap,idx) hwloc_bitmap_isset(bitmap,idx)
31 #define ghost_bitmap_iszero(bitmap) hwloc_bitmap_iszero(bitmap)
32 #define ghost_bitmap_isequal(bitmap1,bitmap2) hwloc_bitmap_isequal(bitmap1,bitmap2)
33 #define ghost_bitmap_last(bitmap) hwloc_bitmap_last(bitmap)
34 #define ghost_bitmap_weight(bitmap) hwloc_bitmap_weight(bitmap)
35 #define ghost_bitmap_iscompact(bitmap) ((ghost_bitmap_last(bitmap)-ghost_bitmap_first(bitmap)+1) == ghost_bitmap_weight(bitmap))
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif
Header file for type definitions.
int32_t ghost_lidx
Definition: types.h:503
Types, functions and macros for error handling.
ghost_error
Error return type.
Definition: error.h:23
ghost_error ghost_bitmap_copy_indices(ghost_bitmap dst, ghost_lidx *offset, ghost_bitmap src, ghost_lidx *idx, ghost_lidx nidx)
Definition: bitmap.c:6
hwloc_bitmap_t ghost_bitmap
ghost_bitmap is just an alias for hwloc_bitmap_t
Definition: bitmap.h:18