CHROMA
qdpjit_memory_wrapper.h
Go to the documentation of this file.
1 #ifndef QDPJIT_MEMORY_WRAPPER_H
2 #define QDPJIT_MEMORY_WRAPPER_H
3 
4 #include "chromabase.h"
5 #include "qdp_config.h"
6 
7 #ifdef QDP_IS_QDPJIT
8 #ifdef QDPJIT_IS_QDPJITNVVM
9 #define GetMemoryPtr(a) QDP_get_global_cache().get_kernel_args( a , false )
10 #define GetMemoryPtr2(o1,o2,i1,i2) {std::vector<QDPCache::ArgKey> _i_n_ = {i1,i2}; auto _o_u_t_ = QDP_get_global_cache().get_kernel_args( _i_n_ , false ); o1 = _o_u_t_[0]; o2 = _o_u_t_[1];}
11 #define GetMemoryPtrGauge(out,in) {std::vector<QDPCache::ArgKey> _i_n_ = {in[0].getId(),in[1].getId(),in[2].getId(),in[3].getId()}; auto _o_u_t_ = QDP_get_global_cache().get_kernel_args( _i_n_ , false ); out[0]=_o_u_t_[0];out[1]=_o_u_t_[1];out[2]=_o_u_t_[2];out[3]=_o_u_t_[3];}
12 #define GetMemoryPtrClover(i1,i2,i3,i4) {std::vector<QDPCache::ArgKey> _i_n_ = {i1,i2,i3,i4}; auto _o_u_t_ = QDP_get_global_cache().get_kernel_args( _i_n_ , false ); clover[0]=_o_u_t_[0]; clover[1]=_o_u_t_[1]; cloverInv[0]=_o_u_t_[2]; cloverInv[1]=_o_u_t_[3];}
13 #else
14 // OLD JIT/PTX wrapper
15 #define GetMemoryPtr(a) QDPCache::Instance().getDevicePtr( a )
16 #endif
17 
18 #endif /* QDP_IS_QDPJIT */
19 
20 #endif /* QDPJIT_MEMORY_WRAPPER */
Primary include file for CHROMA library code.