|
QUDA v0.3.2
A library for QCD on GPUs
|
00001 #ifndef _QUDA_INTERNAL_H 00002 #define _QUDA_INTERNAL_H 00003 00004 #include <cuda_runtime.h> 00005 00006 #ifdef USE_QMP 00007 #include <qmp.h> 00008 #endif 00009 00010 #define MAX_SHORT 32767 00011 00012 // The "Quda" prefix is added to avoid collisions with other libraries. 00013 00014 #define GaugeFieldOrder QudaGaugeFieldOrder 00015 #define DiracFieldOrder QudaDiracFieldOrder 00016 #define CloverFieldOrder QudaCloverFieldOrder 00017 #define InverterType QudaInverterType 00018 //#define Precision QudaPrecision 00019 #define MatPCType QudaMatPCType 00020 #define SolutionType QudaSolutionType 00021 #define MassNormalization QudaMassNormalization 00022 #define PreserveSource QudaPreserveSource 00023 #define ReconstructType QudaReconstructType 00024 #define GaugeFixed QudaGaugeFixed 00025 #define DagType QudaDagType 00026 #define Tboundary QudaTboundary 00027 00028 #include <enum_quda.h> 00029 #include <util_quda.h> 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 typedef void *ParityGauge; 00036 00037 typedef struct { 00038 size_t bytes; 00039 QudaPrecision precision; 00040 int length; // total length 00041 int real_length; // physical length (excluding padding) 00042 int volume; // geometric volume (single parity) 00043 int pad; // padding from end of array to start of next 00044 int stride; // geometric stride between volume lengthed arrays 00045 int X[4]; // the geometric lengths (single parity) 00046 int Nc; // number of colors 00047 ReconstructType reconstruct; 00048 GaugeFixed gauge_fixed; 00049 Tboundary t_boundary; 00050 ParityGauge odd; 00051 ParityGauge even; 00052 double anisotropy; 00053 double tadpole_coeff; 00054 } FullGauge; 00055 00056 typedef struct { 00057 size_t bytes; 00058 QudaPrecision precision; 00059 int length; // total length 00060 int volume; // geometric volume (single parity) 00061 int X[4]; // the geometric lengths (single parity) 00062 int Nc; // number of colors 00063 ParityGauge odd; 00064 ParityGauge even; 00065 double anisotropy; 00066 } FullStaple; 00067 00068 typedef struct { 00069 size_t bytes; 00070 QudaPrecision precision; 00071 int length; // total length 00072 int volume; // geometric volume (single parity) 00073 int X[4]; // the geometric lengths (single parity) 00074 int Nc; // number of colors 00075 ParityGauge odd; 00076 ParityGauge even; 00077 double anisotropy; 00078 } FullMom; 00079 00080 00081 typedef struct { 00082 size_t bytes; 00083 QudaPrecision precision; 00084 int length; 00085 int real_length; // physical length (excluding padding) 00086 int volume; 00087 int pad; // padding from end of array to start of next 00088 int stride; // geometric stride between volume lengthed arrays 00089 int X[4]; 00090 int Nc; 00091 int Ns; 00092 void *clover; 00093 float *cloverNorm; 00094 } ParityClover; 00095 00096 typedef struct { 00097 ParityClover odd; 00098 ParityClover even; 00099 } FullClover; 00100 00101 /* typedef struct { 00102 size_t bytes; 00103 QudaPrecision precision; 00104 int length; // total length 00105 int real_length; // physical length (excluding padding) 00106 int volume; // geometric volume (single parity) 00107 int pad; // padding from end of array to start of next 00108 int stride; // geometric stride between volume lengthed arrays 00109 int X[4]; // the geometric lengths (single parity) 00110 int Nc; // length of color dimension 00111 int Ns; // length of spin dimension 00112 void *spinor; // either (double2*), (float4 *) or (short4 *), depending on precision 00113 float *spinorNorm; // used only when precision is QUDA_HALF_PRECISION 00114 } ParitySpinor; 00115 00116 typedef struct { 00117 ParitySpinor odd; 00118 ParitySpinor even; 00119 } FullSpinor;*/ 00120 00121 typedef struct { 00122 size_t bytes; 00123 QudaPrecision precision; 00124 int length; // total length 00125 int volume; // geometric volume (single parity) 00126 int X[4]; // the geometric lengths (single parity) 00127 int Nc; // length of color dimension 00128 int Ns; // length of spin dimension 00129 void *data; // either (double2*), (float4 *) or (short4 *), depending on precision 00130 float *dataNorm; // used only when precision is QUDA_HALF_PRECISION 00131 } ParityHw; 00132 00133 typedef struct { 00134 ParityHw odd; 00135 ParityHw even; 00136 } FullHw; 00137 00138 #ifdef __cplusplus 00139 } 00140 #endif 00141 00142 #endif // _QUDA_INTERNAL_H
1.7.3