SyTen
cuda_span.h File Reference

A non-owning object for a continuous region of memory. More...

#include <algorithm>
#include <iostream>
#include <array>
#include "inc/util/restrict.h"
#include "inc/util/macros.h"
#include "inc/util/cuda_dynarray.h"
+ Include dependency graph for cuda_span.h:
+ This graph shows which files directly or indirectly include this file:

Classes

class  syten::Cuda::CudaConstSpan< T >
 CudaConstSpan is a non-owning constant reference to a continuous array of objects in CUDA storage. More...
 
class  syten::Cuda::CudaMutSpan< T >
 CudaMutSpan is a non-owning reference to a continuous array of objects in CUDA storage which can be mutated through the span. More...
 

Namespaces

 syten
 Syten namespace.
 
 syten::Cuda
 Support functions (memory allocation etc.) for CUDA-based GPUs.
 

Typedefs

template<typename T >
using syten::CudaConstSpan = Cuda::CudaConstSpan< T >
 Range of constant elements. More...
 
template<typename T >
using syten::CudaMutSpan = Cuda::CudaMutSpan< T >
 Range of mutable elements. More...
 

Functions

void syten::Cuda::conj_copy (CudaConstSpan< double > src, CudaMutSpan< double > dst)
 Copies all data from src to dst (no conjugation takes places as double is real). More...
 
void syten::Cuda::conj_copy (CudaConstSpan< float > src, CudaMutSpan< float > dst)
 Copies all data from src to dst (no conjugation takes places as float is real). More...
 
void syten::Cuda::conj_copy (CudaConstSpan< std::complex< double > > src, CudaMutSpan< std::complex< double > > dst)
 Copies all data from src to dst while complex-conjugating every value. More...
 
void syten::Cuda::conj_copy (CudaConstSpan< std::complex< float > > src, CudaMutSpan< std::complex< float > > dst)
 Copies all data from src to dst while complex-conjugating every value. More...
 
template<typename T >
void syten::Cuda::copy (CudaConstSpan< T > const inp, CudaMutSpan< T > out)
 Copies all data from inp to out. More...
 
template<typename T >
int syten::Cuda::host_device (CudaConstSpan< T > const inp)
 Returns the device hosting the CudaConstSpan range. More...
 
template<typename T >
int syten::Cuda::host_device (CudaMutSpan< T > const inp)
 Returns the device hosting the CudaMutSpan range. More...
 
template<typename T >
syten::Cuda::max_element (CudaConstSpan< T > const inp)
 Returns the absolute-value maximal element of the range. More...
 
std::size_t syten::Cuda::max_element_idx (CudaConstSpan< double > inp)
 Returns the 0-based index of the absolute-value maximal element of the range. More...
 
std::size_t syten::Cuda::max_element_idx (CudaConstSpan< float > inp)
 Returns the 0-based index of the absolute-value maximal element of the range. More...
 
std::size_t syten::Cuda::max_element_idx (CudaConstSpan< std::complex< double > > inp)
 Returns the 0-based index of the absolute-value maximal element of the range. More...
 
std::size_t syten::Cuda::max_element_idx (CudaConstSpan< std::complex< float > > inp)
 Returns the 0-based index of the absolute-value maximal element of the range. More...
 

Detailed Description

A non-owning object for a continuous region of memory.