public void Execute(int index) { int4 k = pairs[index]; CNInfo rxNode = nodes[k.y]; AntennaData tx = antennas[k.z]; AntennaData rx = antennas[k.w]; rxPrecalcNoise[index] = antennaNoise[k.w]; rxSurfaceNormal[index] = rx.isHome ? rxNode.surfaceNormal : double3.zero; txPower[index] = tx.txPower; txFreq[index] = tx.freq; txGain[index] = tx.gain; txBeamwidth[index] = tx.beamwidth; txHome[index] = tx.isHome; txPos[index] = tx.position; txDir[index] = tx.isHome ? (float3)(rx.position - tx.position) : tx.dir; rxFreq[index] = rx.freq; rxGain[index] = rx.gain; rxBeamwidth[index] = rx.beamwidth; rxHome[index] = rx.isHome; rxPos[index] = rx.position; rxDir[index] = rx.isHome ? (float3)(tx.position - rx.position) : rx.dir; rxAMW[index] = rx.AMW; }
public void Execute(int index) { int x = pairs[index].x; int y = pairs[index].y; CNInfo a = nodes[x]; CNInfo b = nodes[y]; valid[index] = x != y && !(a.isHome && b.isHome) && a.canComm && b.canComm; }