修复bug

pull/13/head
陈增辉 2025-03-23 17:31:22 +08:00
parent 8bd997f924
commit 6a62a17dc2
2 changed files with 30 additions and 12 deletions

View File

@ -234,6 +234,7 @@ ErrorCode EchoL0Dataset::Open(QString folder, QString filename)
{ {
return ErrorCode::ECHO_L0DATA_ECHOFILEFORMATERROR; return ErrorCode::ECHO_L0DATA_ECHOFILEFORMATERROR;
} }
return ErrorCode::SUCCESS;
} }
QString EchoL0Dataset::getxmlName() QString EchoL0Dataset::getxmlName()

View File

@ -1016,11 +1016,13 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU_NoAntPattern(size_t startprfid, si
std::map<long, std::shared_ptr<GoalState>> clsGoalStateDict; std::map<long, std::shared_ptr<GoalState>> clsGoalStateDict;
for (const auto& pair : clsCountDict) { for (const auto& pair : clsCountDict) {
if (pair.second > 0) {
clsGoalStateDict.insert( clsGoalStateDict.insert(
std::pair<long, std::shared_ptr<GoalState>>( std::pair<long, std::shared_ptr<GoalState>>(
pair.first, pair.first,
std::shared_ptr<GoalState>((GoalState*)mallocCUDAHost(sizeof(GoalState) * pair.second), FreeCUDAHost))); std::shared_ptr<GoalState>((GoalState*)mallocCUDAHost(sizeof(GoalState) * pair.second), FreeCUDAHost)));
} }
}
// 分块处理大小 // 分块处理大小
size_t blocksize = 1000; size_t blocksize = 1000;
@ -1030,18 +1032,33 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU_NoAntPattern(size_t startprfid, si
clsCountDictTemp.insert(std::pair<long, size_t>(pair.first, pair.second)); clsCountDictTemp.insert(std::pair<long, size_t>(pair.first, pair.second));
} }
double sumdemx = 0;
for (long i = 0; i < demCount; i++) {
sumdemx= sumdemx+demX.get()[i];
}
for (long i = 0; i < demCount; i++) { for (long i = 0; i < demCount; i++) {
long clsid = clsArr.get()[i]; long clsid = clsArr.get()[i];
size_t Currentclscount = clsCountDictTemp[clsid]; size_t Currentclscount = clsCountDictTemp[clsid];
size_t allclscount = clsCountDict[clsid]; size_t allclscount = clsCountDict[clsid];
clsGoalStateDict[clsid].get()[Currentclscount-allclscount].Tx = demX.get()[i];
clsGoalStateDict[clsid].get()[Currentclscount-allclscount].Ty = demY.get()[i]; if (clsGoalStateDict.find(clsid) == clsGoalStateDict.end()) {
clsGoalStateDict[clsid].get()[Currentclscount-allclscount].Tz = demZ.get()[i]; continue;
clsGoalStateDict[clsid].get()[Currentclscount-allclscount].TsX = slpX.get()[i]; }
clsGoalStateDict[clsid].get()[Currentclscount-allclscount].TsY = slpY.get()[i];
clsGoalStateDict[clsid].get()[Currentclscount-allclscount].TsZ = slpZ.get()[i]; clsGoalStateDict[clsid].get()[Currentclscount - allclscount];
clsGoalStateDict[clsid].get()[Currentclscount-allclscount].cls = clsArr.get()[i];
Currentclscount = Currentclscount - 1;
clsGoalStateDict[clsid].get()[allclscount- Currentclscount].Tx = demX.get()[i];
clsGoalStateDict[clsid].get()[allclscount - Currentclscount].Ty = demY.get()[i];
clsGoalStateDict[clsid].get()[allclscount - Currentclscount].Tz = demZ.get()[i];
clsGoalStateDict[clsid].get()[allclscount - Currentclscount].TsX = slpX.get()[i];
clsGoalStateDict[clsid].get()[allclscount - Currentclscount].TsY = slpY.get()[i];
clsGoalStateDict[clsid].get()[allclscount - Currentclscount].TsZ = slpZ.get()[i];
clsGoalStateDict[clsid].get()[allclscount - Currentclscount].cls = clsArr.get()[i];
clsCountDictTemp[clsid] = clsCountDictTemp[clsid] - 1;
} }