Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DeviceSync.h File Reference

CUDA header for GPU runtime. More...

#include "galois/cuda/DynamicBitset.h"
#include "galois/cuda/Context.h"
#include "galois/runtime/DataCommMode.h"
#include "cub/util_allocator.cuh"

Go to the source code of this file.

Macros

#define check_cuda_kernel   check_cuda(cudaGetLastError());
 

Enumerations

enum  SharedType { sharedMaster, sharedMirror, sharedMaster, sharedMirror }
 
enum  UpdateOp {
  setOp, addOp, minOp, setOp,
  addOp, minOp
}
 

Functions

void kernel_sizing (dim3 &blocks, dim3 &threads)
 
template<typename DataType >
__global__ void batch_get_subset (index_type subset_size, const unsigned int *__restrict__ indices, DataType *__restrict__ subset, const DataType *__restrict__ array)
 
template<typename DataType , typename OffsetIteratorType >
__global__ void batch_get_subset (index_type subset_size, const unsigned int *__restrict__ indices, const OffsetIteratorType offsets, DataType *__restrict__ subset, const DataType *__restrict__ array)
 
template<typename DataType >
__global__ void batch_get_reset_subset (index_type subset_size, const unsigned int *__restrict__ indices, DataType *__restrict__ subset, DataType *__restrict__ array, DataType reset_value)
 
template<typename DataType , typename OffsetIteratorType >
__global__ void batch_get_reset_subset (index_type subset_size, const unsigned int *__restrict__ indices, const OffsetIteratorType offsets, DataType *__restrict__ subset, DataType *__restrict__ array, DataType reset_value)
 
template<typename DataType , SharedType sharedType>
__global__ void batch_set_subset (index_type subset_size, const unsigned int *__restrict__ indices, const DataType *__restrict__ subset, DataType *__restrict__ array, DynamicBitset *__restrict__ is_array_updated)
 
template<typename DataType , SharedType sharedType, typename OffsetIteratorType >
__global__ void batch_set_subset (index_type subset_size, const unsigned int *__restrict__ indices, const OffsetIteratorType offsets, const DataType *__restrict__ subset, DataType *__restrict__ array, DynamicBitset *__restrict__ is_array_updated)
 
template<typename DataType , SharedType sharedType>
__global__ void batch_add_subset (index_type subset_size, const unsigned int *__restrict__ indices, const DataType *__restrict__ subset, DataType *__restrict__ array, DynamicBitset *__restrict__ is_array_updated)
 
template<typename DataType , SharedType sharedType, typename OffsetIteratorType >
__global__ void batch_add_subset (index_type subset_size, const unsigned int *__restrict__ indices, const OffsetIteratorType offsets, const DataType *__restrict__ subset, DataType *__restrict__ array, DynamicBitset *__restrict__ is_array_updated)
 
template<typename DataType , SharedType sharedType>
__global__ void batch_min_subset (index_type subset_size, const unsigned int *__restrict__ indices, const DataType *__restrict__ subset, DataType *__restrict__ array, DynamicBitset *__restrict__ is_array_updated)
 
template<typename DataType , SharedType sharedType, typename OffsetIteratorType >
__global__ void batch_min_subset (index_type subset_size, const unsigned int *__restrict__ indices, const OffsetIteratorType offsets, const DataType *__restrict__ subset, DataType *__restrict__ array, DynamicBitset *__restrict__ is_array_updated)
 
template<typename DataType , SharedType sharedType>
__global__ void batch_max_subset (index_type subset_size, const unsigned int *__restrict__ indices, const DataType *__restrict__ subset, DataType *__restrict__ array, DynamicBitset *__restrict__ is_array_updated)
 
template<typename DataType , SharedType sharedType, typename OffsetIteratorType >
__global__ void batch_max_subset (index_type subset_size, const unsigned int *__restrict__ indices, const OffsetIteratorType offsets, const DataType *__restrict__ subset, DataType *__restrict__ array, DynamicBitset *__restrict__ is_array_updated)
 
template<typename DataType >
__global__ void batch_reset (DataType *__restrict__ array, index_type begin, index_type end, DataType val)
 
__global__ void batch_get_subset_bitset (index_type subset_size, const unsigned int *__restrict__ indices, DynamicBitset *__restrict__ is_subset_updated, DynamicBitset *__restrict__ is_array_updated)
 
__global__ void bitset_reset_range (DynamicBitset *__restrict__ bitset, size_t vec_begin, size_t vec_end, bool test1, size_t bit_index1, uint64_t mask1, bool test2, size_t bit_index2, uint64_t mask2)
 
template<typename DataType >
void reset_bitset_field (struct CUDA_Context_Field< DataType > *field, size_t begin, size_t end)
 
template<typename DataType >
void reset_data_field (struct CUDA_Context_Field< DataType > *field, size_t begin, size_t end, DataType val)
 
void get_offsets_from_bitset (index_type bitset_size, unsigned int *__restrict__ offsets, DynamicBitset *__restrict__ bitset, size_t *__restrict__ num_set_bits)
 
template<typename DataType , SharedType sharedType, bool reset>
void batch_get_shared_field (struct CUDA_Context_Common *ctx, struct CUDA_Context_Field< DataType > *field, unsigned from_id, uint8_t *send_buffer, DataType i=0)
 
template<typename DataType >
void serializeMessage (struct CUDA_Context_Common *ctx, DataCommMode data_mode, size_t bit_set_count, size_t num_shared, DeviceOnly< DataType > *shared_data, uint8_t *send_buffer)
 
template<typename DataType , SharedType sharedType, bool reset>
void batch_get_shared_field (struct CUDA_Context_Common *ctx, struct CUDA_Context_Field< DataType > *field, unsigned from_id, uint8_t *send_buffer, size_t *v_size, DataCommMode *data_mode, DataType i=0)
 
template<typename DataType >
void deserializeMessage (struct CUDA_Context_Common *ctx, DataCommMode data_mode, size_t &bit_set_count, size_t num_shared, DeviceOnly< DataType > *shared_data, uint8_t *recv_buffer)
 
template<typename DataType , SharedType sharedType, UpdateOp op>
void batch_set_shared_field (struct CUDA_Context_Common *ctx, struct CUDA_Context_Field< DataType > *field, unsigned from_id, uint8_t *recv_buffer, DataCommMode data_mode)
 

Detailed Description

CUDA header for GPU runtime.

Macro Definition Documentation

#define check_cuda_kernel   check_cuda(cudaGetLastError());

Enumeration Type Documentation

enum SharedType
Enumerator
sharedMaster 
sharedMirror 
sharedMaster 
sharedMirror 
enum UpdateOp
Enumerator
setOp 
addOp 
minOp 
setOp 
addOp 
minOp 

Function Documentation

template<typename DataType , SharedType sharedType>
__global__ void batch_add_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const DataType *__restrict__  subset,
DataType *__restrict__  array,
DynamicBitset *__restrict__  is_array_updated 
)
template<typename DataType , SharedType sharedType, typename OffsetIteratorType >
__global__ void batch_add_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const OffsetIteratorType  offsets,
const DataType *__restrict__  subset,
DataType *__restrict__  array,
DynamicBitset *__restrict__  is_array_updated 
)
template<typename DataType >
__global__ void batch_get_reset_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
DataType *__restrict__  subset,
DataType *__restrict__  array,
DataType  reset_value 
)
template<typename DataType , typename OffsetIteratorType >
__global__ void batch_get_reset_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const OffsetIteratorType  offsets,
DataType *__restrict__  subset,
DataType *__restrict__  array,
DataType  reset_value 
)
template<typename DataType , SharedType sharedType, bool reset>
void batch_get_shared_field ( struct CUDA_Context_Common ctx,
struct CUDA_Context_Field< DataType > *  field,
unsigned  from_id,
uint8_t *  send_buffer,
DataType  i = 0 
)
template<typename DataType , SharedType sharedType, bool reset>
void batch_get_shared_field ( struct CUDA_Context_Common ctx,
struct CUDA_Context_Field< DataType > *  field,
unsigned  from_id,
uint8_t *  send_buffer,
size_t *  v_size,
DataCommMode data_mode,
DataType  i = 0 
)
template<typename DataType >
__global__ void batch_get_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
DataType *__restrict__  subset,
const DataType *__restrict__  array 
)
template<typename DataType , typename OffsetIteratorType >
__global__ void batch_get_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const OffsetIteratorType  offsets,
DataType *__restrict__  subset,
const DataType *__restrict__  array 
)
__global__ void batch_get_subset_bitset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
DynamicBitset *__restrict__  is_subset_updated,
DynamicBitset *__restrict__  is_array_updated 
)
template<typename DataType , SharedType sharedType>
__global__ void batch_max_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const DataType *__restrict__  subset,
DataType *__restrict__  array,
DynamicBitset *__restrict__  is_array_updated 
)
template<typename DataType , SharedType sharedType, typename OffsetIteratorType >
__global__ void batch_max_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const OffsetIteratorType  offsets,
const DataType *__restrict__  subset,
DataType *__restrict__  array,
DynamicBitset *__restrict__  is_array_updated 
)
template<typename DataType , SharedType sharedType>
__global__ void batch_min_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const DataType *__restrict__  subset,
DataType *__restrict__  array,
DynamicBitset *__restrict__  is_array_updated 
)
template<typename DataType , SharedType sharedType, typename OffsetIteratorType >
__global__ void batch_min_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const OffsetIteratorType  offsets,
const DataType *__restrict__  subset,
DataType *__restrict__  array,
DynamicBitset *__restrict__  is_array_updated 
)
template<typename DataType >
__global__ void batch_reset ( DataType *__restrict__  array,
index_type  begin,
index_type  end,
DataType  val 
)
template<typename DataType , SharedType sharedType, UpdateOp op>
void batch_set_shared_field ( struct CUDA_Context_Common ctx,
struct CUDA_Context_Field< DataType > *  field,
unsigned  from_id,
uint8_t *  recv_buffer,
DataCommMode  data_mode 
)
template<typename DataType , SharedType sharedType>
__global__ void batch_set_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const DataType *__restrict__  subset,
DataType *__restrict__  array,
DynamicBitset *__restrict__  is_array_updated 
)
template<typename DataType , SharedType sharedType, typename OffsetIteratorType >
__global__ void batch_set_subset ( index_type  subset_size,
const unsigned int *__restrict__  indices,
const OffsetIteratorType  offsets,
const DataType *__restrict__  subset,
DataType *__restrict__  array,
DynamicBitset *__restrict__  is_array_updated 
)
__global__ void bitset_reset_range ( DynamicBitset *__restrict__  bitset,
size_t  vec_begin,
size_t  vec_end,
bool  test1,
size_t  bit_index1,
uint64_t  mask1,
bool  test2,
size_t  bit_index2,
uint64_t  mask2 
)
template<typename DataType >
void deserializeMessage ( struct CUDA_Context_Common ctx,
DataCommMode  data_mode,
size_t &  bit_set_count,
size_t  num_shared,
DeviceOnly< DataType > *  shared_data,
uint8_t *  recv_buffer 
)
void get_offsets_from_bitset ( index_type  bitset_size,
unsigned int *__restrict__  offsets,
DynamicBitset *__restrict__  bitset,
size_t *__restrict__  num_set_bits 
)
void kernel_sizing ( dim3 &  blocks,
dim3 &  threads 
)
template<typename DataType >
void reset_bitset_field ( struct CUDA_Context_Field< DataType > *  field,
size_t  begin,
size_t  end 
)
template<typename DataType >
void reset_data_field ( struct CUDA_Context_Field< DataType > *  field,
size_t  begin,
size_t  end,
DataType  val 
)
template<typename DataType >
void serializeMessage ( struct CUDA_Context_Common ctx,
DataCommMode  data_mode,
size_t  bit_set_count,
size_t  num_shared,
DeviceOnly< DataType > *  shared_data,
uint8_t *  send_buffer 
)