zeroLowerTriangle

class zeroLowerTriangle : public kotekan::Stage

Zeroes out the lower-triangle of a correlation matrix stream. Created to test the CudaCorrelator stage, which writes some junk in the lower triangle.

An example of this stage being used can be found in config/tests/verify_cuda_n2k.yaml.

There are (samples_per_data_set / nt_inner) matrices per kotekan block, each (num_local_freq * num_elements * num_elements) in size. This stage copies only the upper-triangle part of the N*N matrix from the input buffer to the output, zeroing out the lower-triangle.

Buffers

  • corr_in_buf The input correlation matrix whose lower-triangle is to be zeroed out. Size per frame: num_local_freq * (samples_per_data_set / sub_integration_ntime) * num_elements^2 * 2 * sizeof(int32)

    • Format: int32 complex

  • curr_out_buf The output correlation matrix with zeroed-out lower triangle. Size per frame: num_local_freq * (samples_per_data_set / sub_integration_ntime) * num_elements^2 * 2 * sizeof(int32)

    • Format: int32 complex

Param num_elements:

Int. Number of radio input feeds.

Param num_local_freq:

Int. Number of frequencies in the correlation matrix.

Param samples_per_data_set:

Int. Time samples per frame.

Param sub_integration_ntime:

Int. Number of time samples that are summed into each correlation matrix.

Public Functions

zeroLowerTriangle(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_container)
~zeroLowerTriangle()
virtual void main_thread() override