![]() |
ATLAS Offline Software
|
#include <utility>
#include <type_traits>
#include <cstring>
#include <string>
#include <cstdio>
#include <iostream>
#include <thread>
#include <mutex>
#include <shared_mutex>
#include <memory>
#include <vector>
#include <climits>
#include <new>
#include <cmath>
Go to the source code of this file.
Namespaces | |
CaloRecGPU | |
CaloRecGPU::CUDA_Helpers | |
CaloRecGPU::Helpers | |
CaloRecGPU::Helpers::Constants | |
! | |
CaloRecGPU::Helpers::MemoryContext | |
! Holds dummy classes just to identify the place in which memory lives. | |
Macros | |
#define | CUDA_AVAILABLE 0 |
#define | CUDA_HOS_DEV |
#define | CUDA_ERRCHECK(...) |
Typedefs | |
template<class T , class indexer = unsigned int> | |
using | CaloRecGPU::Helpers::CPU_array = SimpleContainer< T, indexer, MemoryContext::CPU, true > |
Holds a run-time specified amount of objects of type T in CPU memory. More... | |
template<class T , class indexer = unsigned int> | |
using | CaloRecGPU::Helpers::CUDA_array = SimpleContainer< T, indexer, MemoryContext::CUDAGPU, true > |
Holds a run-time specified amount of objects of type T in CUDA GPU memory. More... | |
template<class T , class indexer = unsigned int> | |
using | CaloRecGPU::Helpers::CUDA_kernel_array = SimpleContainer< T, indexer, MemoryContext::CUDAGPU, false > |
Non-owning pointer to an array of T in CUDA GPU memory. More... | |
template<class T > | |
using | CaloRecGPU::Helpers::CPU_object = SimpleHolder< T, MemoryContext::CPU, true > |
Holds an object of type T in CPU memory. More... | |
template<class T > | |
using | CaloRecGPU::Helpers::CUDA_object = SimpleHolder< T, MemoryContext::CUDAGPU, true > |
Holds an object of type T in CUDA GPU memory. More... | |
template<class T > | |
using | CaloRecGPU::Helpers::CUDA_kernel_object = SimpleHolder< T, MemoryContext::CUDAGPU, false > |
Non-owning pointer to an object of type T in CUDA GPU memory. More... | |
template<class T > | |
using | CaloRecGPU::Helpers::CUDA_pinned_CPU_object = SimpleHolder< T, MemoryContext::CUDAPinnedCPU, true > |
Holds an object of type T in CUDA GPU memory. More... | |
Functions | |
void * | CaloRecGPU::CUDA_Helpers::allocate (const size_t num) |
Allocates and returns the address of num bytes from GPU memory. More... | |
void | CaloRecGPU::CUDA_Helpers::deallocate (void *address) |
Deallocates address in GPU memory. More... | |
void * | CaloRecGPU::CUDA_Helpers::allocate_pinned (const size_t num) |
Allocates and returns the address of num bytes from CPU pinned memory. More... | |
void | CaloRecGPU::CUDA_Helpers::deallocate_pinned (void *address) |
Deallocates address in CPU pinned memory. More... | |
void | CaloRecGPU::CUDA_Helpers::GPU_to_CPU (void *dest, const void *const source, const size_t num) |
Copies num bytse from source in GPU memory to dest in CPU memory. More... | |
void | CaloRecGPU::CUDA_Helpers::CPU_to_GPU (void *dest, const void *const source, const size_t num) |
Copies num bytes from source in CPU memory to dest in GPU memory. More... | |
void | CaloRecGPU::CUDA_Helpers::GPU_to_GPU (void *dest, const void *const source, const size_t num) |
Copies num bytes from source to dest , both in GPU memory. More... | |
void | CaloRecGPU::CUDA_Helpers::GPU_to_CPU_async (void *dest, const void *const source, const size_t num, CUDAStreamPtrHolder stream={}) |
Copies num bytes from source in GPU memory to dest in CPU memory, asynchronously. More... | |
void | CaloRecGPU::CUDA_Helpers::CPU_to_GPU_async (void *dest, const void *const source, const size_t num, CUDAStreamPtrHolder stream={}) |
Copies num bytes from source in CPU memory to dest in GPU memory, asynchronously. More... | |
void | CaloRecGPU::CUDA_Helpers::GPU_to_GPU_async (void *dest, const void *const source, const size_t num, CUDAStreamPtrHolder stream={}) |
Copies num bytes from source to dest , both in GPU memory, asynchronously. More... | |
void | CaloRecGPU::CUDA_Helpers::GPU_synchronize (CUDAStreamPtrHolder stream={}) |
Synchronizes the stream . More... | |
void | CaloRecGPU::CUDA_Helpers::optimize_block_and_grid_size (void *func, int &block_size, int &grid_size, const int dynamic_memory=0, const int block_size_limit=0) |
Optimizes block and grid size according to cudaOccupancyMaxPotentialBlockSize . More... | |
void | CaloRecGPU::CUDA_Helpers::optimize_block_and_grid_size_for_cooperative_launch (void *func, int &block_size, int &grid_size, const int dynamic_memory=0, const int block_size_limit=0) |
Optimizes block and grid size for a cooperative launch. More... | |
bool | CaloRecGPU::CUDA_Helpers::supports_cooperative_launches () |
bool | CaloRecGPU::CUDA_Helpers::supports_dynamic_parallelism () |
std::string | CaloRecGPU::CUDA_Helpers::GPU_name () |
constexpr int | CaloRecGPU::Helpers::int_ceil_div (const int num, const int denom) |
Returns the ceiling of num/denom, with proper rounding. More... | |
constexpr int | CaloRecGPU::Helpers::int_floor_div (const int num, const int denom) |
Returns the floor of num/denom, with proper rounding. More... | |
template<class Base = float, class Exp = int> | |
constexpr Base | CaloRecGPU::Helpers::compile_time_pow2 (const Exp exp) |
Returns 2 to the power of exp . More... | |
template<class T > | |
constexpr unsigned char | CaloRecGPU::Helpers::Pearson_hash (const T number) |
Calculates a Pearson hash from @ number. More... | |
template<class T > | |
constexpr unsigned short | CaloRecGPU::Helpers::Pearson_hash_16_bit (const T number) |
Calculates a 16-bit Pearson hash from @ number. More... | |
Variables | |
template<class T > | |
constexpr T | CaloRecGPU::Helpers::Constants::pi = T(3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624L) |
template<class T > | |
constexpr T | CaloRecGPU::Helpers::Constants::sqrt2 = T(1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727350138462309122970249248360558507372126441214970999358314132226659275055927557999505011527820605714701095599716059702745345968620147285174186408891986095523292304843087143214508397626036279952514079896872533965463318088296406206152583523950547457502877599617298355752203375318570113543746034084988471603868999706990048150305440277903164542478230684929369186215805784631115966687130130156185689872372352885092649L) |
template<class T > | |
constexpr T | CaloRecGPU::Helpers::Constants::inv_sqrt2 = T(0.70710678118654752440084436210484903928483593768847403658833986899536623923105351942519376716382078636750692311545614851246241802792536860632206074854996791570661133296375279637789997525057639103028573505477998580298513726729843100736425870932044459930477616461524215435716072541988130181399762570399484362669827316590441482031030762917619752737287514387998086491778761016876592850567718730170424942358019344998534950240751527201389515822712391153424646845931079028923155579833435650650780928449361861764425463243L) |
#define CUDA_AVAILABLE 0 |
Definition at line 48 of file Calorimeter/CaloRecGPU/CaloRecGPU/Helpers.h.
#define CUDA_ERRCHECK | ( | ... | ) |
Definition at line 103 of file Calorimeter/CaloRecGPU/CaloRecGPU/Helpers.h.
#define CUDA_HOS_DEV |
Definition at line 102 of file Calorimeter/CaloRecGPU/CaloRecGPU/Helpers.h.