QUDA v0.4.0
A library for QCD on GPUs
|
00001 #ifndef _QUDA_INTERNAL_H 00002 #define _QUDA_INTERNAL_H 00003 00004 #include <cuda.h> 00005 #include <cuda_runtime.h> 00006 00007 #ifdef USE_QDPJIT 00008 #include "qdp_quda.h" 00009 #endif 00010 00011 #ifdef QMP_COMMS 00012 #include <qmp.h> 00013 #endif 00014 00015 #define MAX_SHORT 32767.0f 00016 00017 // The "Quda" prefix is added to avoid collisions with other libraries. 00018 00019 #define GaugeFieldOrder QudaGaugeFieldOrder 00020 #define DiracFieldOrder QudaDiracFieldOrder 00021 #define CloverFieldOrder QudaCloverFieldOrder 00022 #define InverterType QudaInverterType 00023 //#define Precision QudaPrecision 00024 #define MatPCType QudaMatPCType 00025 #define SolutionType QudaSolutionType 00026 #define MassNormalization QudaMassNormalization 00027 #define PreserveSource QudaPreserveSource 00028 #define DagType QudaDagType 00029 #define TEX_ALIGN_REQ (512*2) //Fermi, factor 2 comes from even/odd 00030 #define ALIGNMENT_ADJUST(n) ( (n+TEX_ALIGN_REQ-1)/TEX_ALIGN_REQ*TEX_ALIGN_REQ) 00031 #include <enum_quda.h> 00032 #include <quda.h> 00033 #include <util_quda.h> 00034 00035 #ifdef __cplusplus 00036 extern "C" { 00037 #endif 00038 00039 typedef void *ParityGauge; 00040 00041 // replace below with ColorSpinorField 00042 typedef struct { 00043 size_t bytes; 00044 QudaPrecision precision; 00045 int length; // total length 00046 int volume; // geometric volume (single parity) 00047 int X[QUDA_MAX_DIM]; // the geometric lengths (single parity) 00048 int Nc; // length of color dimension 00049 int Ns; // length of spin dimension 00050 void *data; // either (double2*), (float4 *) or (short4 *), depending on precision 00051 float *dataNorm; // used only when precision is QUDA_HALF_PRECISION 00052 } ParityHw; 00053 00054 typedef struct { 00055 ParityHw odd; 00056 ParityHw even; 00057 } FullHw; 00058 00059 extern cudaDeviceProp deviceProp; 00060 extern cudaStream_t *streams; 00061 00062 #ifdef __cplusplus 00063 } 00064 #endif 00065 00066 #ifdef MULTI_GPU 00067 const int Nstream = 9; 00068 #else 00069 const int Nstream = 1; 00070 #endif 00071 00072 extern int verbose; 00073 00074 #endif // _QUDA_INTERNAL_H