同步修改测试
parent
62824ffda5
commit
4f79dbd6a7
|
|
@ -309,8 +309,6 @@ __global__ void CUDA_Kernel_Computer_R_amp(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__global__ void CUDA_Kernel_Computer_echo(
|
__global__ void CUDA_Kernel_Computer_echo(
|
||||||
float* d_temp_R, float* d_temp_amps, long posNum,
|
float* d_temp_R, float* d_temp_amps, long posNum,
|
||||||
float f0, float dfreq,
|
float f0, float dfreq,
|
||||||
|
|
@ -380,7 +378,6 @@ __global__ void CUDA_Kernel_Computer_echo(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分块计算主流程
|
* 分块计算主流程
|
||||||
*/
|
*/
|
||||||
|
|
@ -453,9 +450,6 @@ void CUDA_RFPC_MainProcess(
|
||||||
process = sTi * 100.0 / TargetNumber;
|
process = sTi * 100.0 / TargetNumber;
|
||||||
PRINT("TargetID [%f]: %d / %d finished\n", sTi * 100.0 / TargetNumber, sTi, TargetNumber);
|
PRINT("TargetID [%f]: %d / %d finished\n", sTi * 100.0 / TargetNumber, sTi, TargetNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -589,7 +583,7 @@ __global__ void CUDA_Kernel_Computer_echo_NoAntPattern(
|
||||||
for (long dataid = 0; dataid < SHAREMEMORY_FLOAT_HALF; dataid++) {
|
for (long dataid = 0; dataid < SHAREMEMORY_FLOAT_HALF; dataid++) {
|
||||||
|
|
||||||
temp_phi = s_R[dataid] * factorjTemp;
|
temp_phi = s_R[dataid] * factorjTemp;
|
||||||
temp_amp = s_amp[dataid];
|
temp_amp = 1; s_amp[dataid];
|
||||||
echo.x += (temp_amp * cosf(temp_phi));
|
echo.x += (temp_amp * cosf(temp_phi));
|
||||||
echo.y += (temp_amp * sinf(temp_phi));
|
echo.y += (temp_amp * sinf(temp_phi));
|
||||||
//if (dataid > 5000) {
|
//if (dataid > 5000) {
|
||||||
|
|
@ -710,6 +704,7 @@ extern "C" void ProcessRFPCTask(RFPCTask& task, long devid)
|
||||||
long BLOCK_FREQNUM = NextBlockPad(task.freqNum, BLOCK_SIZE); // 256*freqBlockID
|
long BLOCK_FREQNUM = NextBlockPad(task.freqNum, BLOCK_SIZE); // 256*freqBlockID
|
||||||
long cudaBlocknum = 0;
|
long cudaBlocknum = 0;
|
||||||
long freqpoints = BLOCK_FREQNUM;
|
long freqpoints = BLOCK_FREQNUM;
|
||||||
|
|
||||||
printf("freqpoints:%d\n", freqpoints);
|
printf("freqpoints:%d\n", freqpoints);
|
||||||
long process = 0;
|
long process = 0;
|
||||||
for (long sTi = 0; sTi < task.targetnum; sTi = sTi + SHAREMEMORY_FLOAT_HALF) {
|
for (long sTi = 0; sTi < task.targetnum; sTi = sTi + SHAREMEMORY_FLOAT_HALF) {
|
||||||
|
|
@ -721,7 +716,7 @@ extern "C" void ProcessRFPCTask(RFPCTask& task, long devid)
|
||||||
task.targetnum,
|
task.targetnum,
|
||||||
sTi, task.targetnum,
|
sTi, task.targetnum,
|
||||||
task.sigma0_cls,
|
task.sigma0_cls,
|
||||||
1,
|
task.pt,
|
||||||
task.Rref,
|
task.Rref,
|
||||||
task.Rnear, task.Rfar,
|
task.Rnear, task.Rfar,
|
||||||
d_R, d_amps// 计算输出
|
d_R, d_amps// 计算输出
|
||||||
|
|
@ -729,9 +724,6 @@ extern "C" void ProcessRFPCTask(RFPCTask& task, long devid)
|
||||||
PrintLasterError("CUDA_Kernel_Computer_R_amp");
|
PrintLasterError("CUDA_Kernel_Computer_R_amp");
|
||||||
cudaDeviceSynchronize();
|
cudaDeviceSynchronize();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cudaBlocknum = (task.prfNum * BLOCK_FREQNUM + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
cudaBlocknum = (task.prfNum * BLOCK_FREQNUM + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||||
CUDA_Kernel_Computer_echo_NoAntPattern << <cudaBlocknum, BLOCK_SIZE >> > (
|
CUDA_Kernel_Computer_echo_NoAntPattern << <cudaBlocknum, BLOCK_SIZE >> > (
|
||||||
d_R, d_amps, SHAREMEMORY_FLOAT_HALF,
|
d_R, d_amps, SHAREMEMORY_FLOAT_HALF,
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ extern "C" struct RFPCTask
|
||||||
double Rfar;
|
double Rfar;
|
||||||
double Rref;
|
double Rref;
|
||||||
|
|
||||||
|
double Pt = 1;
|
||||||
|
|
||||||
SateState* antlist = nullptr;
|
SateState* antlist = nullptr;
|
||||||
GoalState* goallist = nullptr;
|
GoalState* goallist = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -1069,6 +1069,7 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU_NoAntPattern(size_t startprfid, si
|
||||||
task.Rref = this->EchoSimulationData->getRefPhaseRange();
|
task.Rref = this->EchoSimulationData->getRefPhaseRange();
|
||||||
task.Rnear = this->EchoSimulationData->getNearRange();
|
task.Rnear = this->EchoSimulationData->getNearRange();
|
||||||
task.Rfar = this->EchoSimulationData->getFarRange();
|
task.Rfar = this->EchoSimulationData->getFarRange();
|
||||||
|
task.Pt = this->TaskSetting->getPt();
|
||||||
task.startFreq = this->EchoSimulationData->getCenterFreq() - this->EchoSimulationData->getBandwidth() / 2;
|
task.startFreq = this->EchoSimulationData->getCenterFreq() - this->EchoSimulationData->getBandwidth() / 2;
|
||||||
task.stepFreq = this->EchoSimulationData->getBandwidth() / (task.freqNum - 1);
|
task.stepFreq = this->EchoSimulationData->getBandwidth() / (task.freqNum - 1);
|
||||||
task.d_echoData = (cuComplex*)mallocCUDADevice(prfcount * task.freqNum * sizeof(cuComplex), devId);
|
task.d_echoData = (cuComplex*)mallocCUDADevice(prfcount * task.freqNum * sizeof(cuComplex), devId);
|
||||||
|
|
@ -1136,8 +1137,6 @@ ErrorCode RFPCProcessCls::SaveBlockSimulationEchoArr(cuComplex* d_echoData,size_
|
||||||
|
|
||||||
for (size_t i = 0; i < prfcount; i++) {
|
for (size_t i = 0; i < prfcount; i++) {
|
||||||
for (size_t j = 0; j < freqNum; j++) {
|
for (size_t j = 0; j < freqNum; j++) {
|
||||||
//fileEchoArr.get()[i * freqNum + j] = std::complex<double>(1, 1);
|
|
||||||
|
|
||||||
std::complex<double> temp = fileEchoArr.get()[i * freqNum + j];
|
std::complex<double> temp = fileEchoArr.get()[i * freqNum + j];
|
||||||
fileEchoArr.get()[i * freqNum + j] = std::complex<double>(
|
fileEchoArr.get()[i * freqNum + j] = std::complex<double>(
|
||||||
temp.real() + h_echoData[i * freqNum + j].x,
|
temp.real() + h_echoData[i * freqNum + j].x,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue