 
 /**
  * @details
- * Weights generator CUDA kernel.
+ * 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.
  *
- * This 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.

    _generateWeights <<<wBlocks, wThreadsPerBlock>>> (
            na, axd, ayd, weights, cosBeamEl, cosBeamAz, sinBeamAz, k);

    // Invoke kernel to compute the beam pattern.
    int threadsPerBlock = 384;
    int blocks = (ns + threadsPerBlock - 1) / threadsPerBlock;
    _beamPattern <<<blocks, threadsPerBlock>>> (na, axd, ayd, weights,

#include "cuda/beamPattern.h"

#ifndef M_PI
#define M_PI 3.1415926535
