StatMech
Loading...
Searching...
No Matches
HilbertSpace.hpp File Reference

Go to the source code of this file.

Classes

class  HilbertSpace< Derived >
 
class  HilbertSpace< int >
 
class  ManyBodySpaceBase< Derived >
 ManyBodySpinSpace \(\mathcal{H}\) defined by \(\mathcal{H} \coloneqq \mathcal{H}_{\mathrm{loc}}^{\otimes L}\), where. More...
 
struct  HilbertSpaceTraits< ManyBodySpinSpace >
 
class  ManyBodySpinSpace
 
struct  HilbertSpaceTraits< ManyBodyBosonSpace >
 
class  ManyBodyBosonSpace
 
class  SubSpace< TotalSpace_, ScalarType_ >
 

Functions

template<typename Derived >
__global__ void setTransEqDim_kernel (ManyBodySpaceBase< Derived > *obj, int transEqDim)
 
template<typename Derived >
__global__ void copyTransEqClass_kernel (ManyBodySpaceBase< Derived > *obj, int *srcTransEqClassRep, int *srcTransPeriod)
 

Function Documentation

◆ copyTransEqClass_kernel()

template<typename Derived >
__global__ void copyTransEqClass_kernel ( ManyBodySpaceBase< Derived > *  obj,
int *  srcTransEqClassRep,
int *  srcTransPeriod 
)
77 {
78 int const idx = blockIdx.x * blockDim.x + threadIdx.x;
79 if(idx >= obj->transEqDim()) return;
80 obj->m_transEqClassRep(idx) = srcTransEqClassRep[idx];
81 obj->m_transPeriod(idx) = srcTransPeriod[idx];
82 for(auto trans = 0; trans != srcTransPeriod[idx]; ++trans) {
83 auto translated = obj->translate(srcTransEqClassRep[idx], trans);
84 obj->m_stateToTransEqClass(translated) = idx;
85 }
86}
__host__ __device__ int translate(int state, int trans) const
Translate the input state to the left by one.
Definition HilbertSpace.hpp:300
__host__ __device__ int transEqDim() const
Definition HilbertSpace.hpp:309
Vector_t m_transPeriod
Definition HilbertSpace.hpp:145
Vector_t m_stateToTransEqClass
Definition HilbertSpace.hpp:146
Vector_t m_transEqClassRep
Definition HilbertSpace.hpp:144

◆ setTransEqDim_kernel()

template<typename Derived >
__global__ void setTransEqDim_kernel ( ManyBodySpaceBase< Derived > *  obj,
int  transEqDim 
)
68 {
69 debug_printf("%s\n\ttransEqDim=%d\n", __PRETTY_FUNCTION__, transEqDim);
70 obj->m_transEqDim = transEqDim;
71 obj->m_transEqClassRep.resize(transEqDim);
72 obj->m_transPeriod.resize(transEqDim);
73 obj->m_stateToTransEqClass.resize(obj->dim());
74}
__host__ __device__ int dim() const
Definition HilbertSpace.hpp:34
int m_transEqDim
Definition HilbertSpace.hpp:143