tongbuxiugai
parent
cb9012e750
commit
96eb60bbec
|
|
@ -510,23 +510,10 @@ __global__ void CUDA_Kernel_RFPC(
|
|||
|
||||
cuComplex echo = make_cuComplex(0, 0);
|
||||
|
||||
for (long startid = 0; startid < demLen; startid = startid + SHAREMEMORY_DEM_STEP)
|
||||
{
|
||||
__syncthreads(); // 确定所有待处理数据都已经进入程序中
|
||||
for (long i = 0; i < 3; i++) {
|
||||
long ttid = startid + threadid + i * blockDim.x;
|
||||
long stid = threadid + i * blockDim.x;
|
||||
if ((stid < SHAREMEMORY_DEM_STEP) && (ttid < demLen)) {
|
||||
Ts[stid] = goallist[ttid];
|
||||
}
|
||||
}
|
||||
__syncthreads(); // 确定所有待处理数据都已经进入程序中
|
||||
|
||||
for (long tid = 0; tid < SHAREMEMORY_DEM_STEP; tid++)
|
||||
{
|
||||
if ((tid + startid) < demLen)
|
||||
{
|
||||
GoalState p = Ts[tid];
|
||||
|
||||
for (long tid = 0;tid < demLen;tid++) {
|
||||
GoalState p = goallist[tid];
|
||||
Tx = p.Tx;
|
||||
Ty = p.Ty;
|
||||
Tz = p.Tz;
|
||||
|
|
@ -536,7 +523,7 @@ __global__ void CUDA_Kernel_RFPC(
|
|||
Tz = antPos.Pz - Tz;
|
||||
|
||||
R = sqrt(Tx * Tx + Ty * Ty + Tz * Tz);
|
||||
bool isNearFar = (R < NearR || R > FarR);
|
||||
bool isNearFar = (R < NearR || R > FarR) && ((abs(p.TsX) > 1000) || (abs(p.TsY) > 1000) || (abs(p.TsZ) > 1000));
|
||||
|
||||
|
||||
incAngle = sqrt(p.TsX * p.TsX + p.TsY * p.TsY + p.TsZ * p.TsZ);
|
||||
|
|
@ -552,7 +539,9 @@ __global__ void CUDA_Kernel_RFPC(
|
|||
echo_imag = incAngle * sin(R) * isNearFar;
|
||||
echo.x = echo.x + echo_real;
|
||||
echo.y = echo.y + echo_imag;
|
||||
}
|
||||
|
||||
if (idx == 0 && tid % (10 * SHAREMEMORY_DEM_STEP) == 0) {
|
||||
printf("Idx:%d , TsID: %d, TSCOUNT: %d \n", idx, tid, demLen);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue