44#include <cuda_runtime.h>
45#include <device_launch_parameters.h>
63 struct infoForMatVecMul
65 std::vector<int> nClosePanels;
66 std::vector<int> nFarCells;
68 std::vector<int> closePrefixSum;
69 std::vector<int> farPrefixSum;
87 i00D = i01D = i10D = i11D =
nullptr;
90 closeCellsIdxD =
nullptr;
91 farCellsIdxD =
nullptr;
96 void ReleaseGpuMemory();
131 Point2D* maxrD, * minrD;
136 int* mortonCodesKeyUnsortD;
137 int* mortonCodesKeyD;
139 int* mortonCodesIdxUnsortD;
140 int* mortonCodesIdxD;
150 Point4D* lowerupperD;
151 Point4D* gabForLeavesD;
157 void* sortObjectsBufferD;
158 int sortObjectsBufferSizeInBytes;
160 void* sortInternalCellsBufferD;
161 int sortInternalCellsBufferSizeInBytes;
164 int reservedMemorySizeItems;
166 infoForMatVecMul matVecMulInfo;
168 CudaTreeInfo(
int nBlock_,
tree_T treeType_,
object_T objectType_,
scheme_T schemeType_,
bool duplicateObj_);
171 void Update(
int nObject_,
double* objectD_);
172 void UpdatePanelGeometry(
int nObject_, double4* gabForLeavesD_);
174 void UpdatePanelFreeVortexIntensity(
const double* dev_ptr_freeVortexSheet,
const double* dev_ptr_freeVortexSheetLin);
175 void UpdatePanelAttachedVortexIntensity(
const double* dev_ptr_attachedVortexSheet,
const double* dev_ptr_attachedVortexSheetLin);
176 void UpdatePanelAttachedSourceIntensity(
const double* dev_ptr_attachedSourceSheet,
const double* dev_ptr_attachedSourceSheetLin);
177 void UpdatePanelFreeAndAttachedVortexIntensity(
const double* dev_ptr_freeVortexSheet,
const double* dev_ptr_freeVortexSheetLin,
const double* dev_ptr_attachedVortexSheet,
const double* dev_ptr_attachedVortexSheetLin);
179 float MemoryAllocateForGMRES(
bool firstStep,
double itheta2);
180 void MemoryFreeForGMRES();
182 void MemoryAllocate(
int nCudaObject);
184 bool IsInitialized()
const;
187 float UpwardTraversal(
int order);
189 template <
int NUMBER_OF_THREADS>
190 float DownwardTraversalVorticesToPoints(CudaTreeInfo& cntrTree, Point2D* velD,
double* epsastD,
double theta,
int order,
bool calcRadius);
192 float DownwardTraversalVorticesToPanels(CudaTreeInfo& cntrTree,
double* rhsD,
double* rhsLinD,
double theta,
int order);
193 float DownwardTraversalPanelsToPoints(CudaTreeInfo& cntrTree, Point2D* velD,
double theta,
int order);
194 float DownwardTraversalGMRES(
double* resD,
double* resLinD,
double itheta2,
int order,
int iter,
bool memAlloc);
196 float I1I2CalculationWrapper(
double minRd,
double* __restrict I1D, Point2D* __restrict I2D,
double* __restrict epsastD);
197 float I0I3CalculationWrapper(
double minRd,
float* __restrict I0D, Point2Df* __restrict I3D,
double* __restrict epsastD,
const double* __restrict meanEpsD,
int nPan,
double* __restrict panD,
double* __restrict visstrD);
198 void RadixSortMortonCodes(
int beginBit = 0,
int endBit = 2 *
codeLength);
199 void RadixSortInternalCells(
int beginBit = 0,
int endBit = 2 *
codeLength);
Описание констант и параметров для взаимодействия с графическим ускорителем
Заголовочный файл с описанием класса Vortex2D.