     _generateWeights <<<wBlocks, wThreadsPerBlock>>> (
             na, axd, ayd, weights, cosBeamEl, cosBeamAz, sinBeamAz, k);
 
-    // Invoke kernel to compute the beam pattern.
+    // Invoke kernel to compute the beam pattern on the device.
     int threadsPerBlock = 384;
     int blocks = (ns + threadsPerBlock - 1) / threadsPerBlock;
     _beamPattern <<<blocks, threadsPerBlock>>> (na, axd, ayd, weights,


/**
 * @details
 * Beam pattern computation kernel.
 */
__global__ void _beamPattern(const int na, const float* ax, const float* ay,
        const float2* weights, const int ns, const float* slon, const float* slat,


/**
 * @details
 * This CUDA kernel produces the complex antenna beamforming weights for the
 * given direction, and stores them in device memory.
 * Each thread generates the complex weight for a single antenna.
 *
 * The number of floating-point operations performed by this kernel is:
 * \li Sines and cosines: 2 * na.
 * \li Multiplies: 4 * na.
 * \li Divides: 2 * na.
 * \li Additions / subtractions: na.
 *
 * @param[in] na Number of antennas.
 * @param[in] ax Array of antenna x positions.
