From cfa7a4af480f4ee521da5f1e124f79d4d142605a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 2 Jun 2022 21:41:19 +0200 Subject: [PATCH] Improve source code visualization in some code editors --- src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 4 ++-- src/algorithms/libs/beidou_b1i_signal_replica.cc | 2 +- .../gnuradio_blocks/hybrid_observables_gs.cc | 4 ++-- src/algorithms/tracking/libs/cuda_multicorrelator.cu | 12 ++++++------ src/core/libs/gnss_sdr_sample_counter.cc | 4 ++-- ...alileo_e1_pcps_ambiguous_acquisition_test_fpga.cc | 8 ++++---- .../gps_l1_ca_pcps_acquisition_test_fpga.cc | 8 ++++---- .../observables/hybrid_observables_test_fpga.cc | 8 ++++---- .../tracking/tracking_pull-in_test_fpga.cc | 8 ++++---- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index 83299a356..b6efdeebc 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -1951,7 +1951,7 @@ void rtklib_pvt_gs::initialize_and_apply_carrier_phase_offset() int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_items, gr_vector_void_star& output_items __attribute__((unused))) { - //**************** time tags **************** + // *************** time tags **************** if (d_enable_rx_clock_correction == false) // todo: currently only works if clock correction is disabled { std::vector tags_vec; @@ -1978,7 +1978,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item } } } - //************* end time tags ************** + // ************ end time tags ************** for (int32_t epoch = 0; epoch < noutput_items; epoch++) { diff --git a/src/algorithms/libs/beidou_b1i_signal_replica.cc b/src/algorithms/libs/beidou_b1i_signal_replica.cc index 661ac3ef0..513a78cac 100644 --- a/src/algorithms/libs/beidou_b1i_signal_replica.cc +++ b/src/algorithms/libs/beidou_b1i_signal_replica.cc @@ -75,7 +75,7 @@ void beidou_b1i_code_gen_int(own::span dest, int32_t prn, uint32_t chip } // Set the delay - delay = code_length - delays[prn_idx] * 0; //********************************** + delay = code_length - delays[prn_idx] * 0; // ********************************* delay += chip_shift; delay %= code_length; diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc index 0ca0fc3a8..f17255053 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc @@ -717,7 +717,7 @@ int hybrid_observables_gs::general_work(int noutput_items __attribute__((unused) // Push the tracking observables into buffers to allow the observable interpolation at the desired Rx clock for (uint32_t n = 0; n < d_nchannels_out; n++) { - //**************** time tags **************** + // *************** time tags **************** // std::vector tags_vec; // this->get_tags_in_range(tags_vec, n, this->nitems_read(n), this->nitems_read(n) + ninput_items[n]); // for (std::vector::iterator it = tags_vec.begin(); it != tags_vec.end(); ++it) @@ -741,7 +741,7 @@ int hybrid_observables_gs::general_work(int noutput_items __attribute__((unused) // } // } - //************* end time tags ************** + // ************ end time tags ************** for (int32_t m = 0; m < ninput_items[n]; m++) { // Push the valid tracking Gnss_Synchros to their corresponding deque diff --git a/src/algorithms/tracking/libs/cuda_multicorrelator.cu b/src/algorithms/tracking/libs/cuda_multicorrelator.cu index 6179e56d9..44599c6bd 100644 --- a/src/algorithms/tracking/libs/cuda_multicorrelator.cu +++ b/src/algorithms/tracking/libs/cuda_multicorrelator.cu @@ -189,12 +189,12 @@ bool cuda_multicorrelator::init_cuda_integrated_resampler( // ALLOCATE GPU MEMORY FOR INPUT/OUTPUT and INTERNAL vectors size_t size = signal_length_samples * sizeof(GPU_Complex); - //********* ZERO COPY VERSION ************ + // ******** ZERO COPY VERSION ************ // Set flag to enable zero copy access // Optimal in shared memory devices (like Jetson K1) - //cudaSetDeviceFlags(cudaDeviceMapHost); + // cudaSetDeviceFlags(cudaDeviceMapHost); - //******** CudaMalloc version *********** + // ******* CudaMalloc version *********** // input signal GPU memory (can be mapped to CPU memory in shared memory devices!) // cudaMalloc((void **)&d_sig_in, size); @@ -237,7 +237,7 @@ bool cuda_multicorrelator::set_local_code_and_taps( int n_correlators) { cudaSetDevice(selected_gps_device); - //********* ZERO COPY VERSION ************ + // ******** ZERO COPY VERSION ************ // // Get device pointer from host memory. No allocation or memcpy // cudaError_t code; // // local code CPU -> GPU copy memory @@ -253,7 +253,7 @@ bool cuda_multicorrelator::set_local_code_and_taps( // printf("cuda cudaHostGetDevicePointer error in set_local_code_and_taps \r\n"); // } - //******** CudaMalloc version *********** + // ******* CudaMalloc version *********** //local code CPU -> GPU copy memory cudaMemcpyAsync(d_local_codes_in, local_codes_in, sizeof(GPU_Complex) * code_length_chips, cudaMemcpyHostToDevice, stream1); d_code_length_chips = code_length_chips; @@ -315,7 +315,7 @@ bool cuda_multicorrelator::Carrier_wipeoff_multicorrelator_resampler_cuda( // input signal CPU -> GPU copy memory //cudaMemcpyAsync(d_sig_in, d_sig_in_cpu, memSize, // cudaMemcpyHostToDevice, stream2); - //***** NOTICE: NCO is computed on-the-fly, not need to copy NCO into GPU! **** + // **** NOTICE: NCO is computed on-the-fly, not need to copy NCO into GPU! **** //launch the multitap correlator with integrated local code resampler! diff --git a/src/core/libs/gnss_sdr_sample_counter.cc b/src/core/libs/gnss_sdr_sample_counter.cc index 8a607ba50..c3011081f 100644 --- a/src/core/libs/gnss_sdr_sample_counter.cc +++ b/src/core/libs/gnss_sdr_sample_counter.cc @@ -144,7 +144,7 @@ int gnss_sdr_sample_counter::work(int noutput_items __attribute__((unused)), out[0].Tracking_sample_counter = sample_counter; current_T_rx_ms += interval_ms; - //**************** time tags **************** + // *************** time tags **************** std::vector tags_vec; // notice that nitems_read is updated in decimation blocks after leaving work() with return 1, equivalent to call consume_each this->get_tags_in_range(tags_vec, 0, this->nitems_read(0), this->nitems_read(0) + samples_per_output); @@ -182,7 +182,7 @@ int gnss_sdr_sample_counter::work(int noutput_items __attribute__((unused)), } } - //************* end time tags ************** + // ************ end time tags ************** return 1; } diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test_fpga.cc index 8cd656409..3206fdc67 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test_fpga.cc @@ -126,9 +126,9 @@ void* handler_DMA_galileo_e1_pcps_ambiguous_acq_test(void* arguments) return nullptr; } - //************************************************************************** + // ************************************************************************* // Open DMA device - //************************************************************************** + // ************************************************************************* tx_fd = open("/dev/loop_tx", O_WRONLY); if (tx_fd < 0) { @@ -136,9 +136,9 @@ void* handler_DMA_galileo_e1_pcps_ambiguous_acq_test(void* arguments) return nullptr; } - //************************************************************************** + // ************************************************************************* // Open input file - //************************************************************************** + // ************************************************************************* uint32_t skip_samples = 0; // static_cast(FLAGS_skip_samples); if (skip_samples + skip_used_samples > 0) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc index 19bd91b7c..eb5d8fe2a 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc @@ -125,9 +125,9 @@ void* handler_DMA_gps_l1_acq_test(void* arguments) return nullptr; } - //************************************************************************** + // ************************************************************************* // Open DMA device - //************************************************************************** + // ************************************************************************* tx_fd = open("/dev/loop_tx", O_WRONLY); if (tx_fd < 0) { @@ -135,9 +135,9 @@ void* handler_DMA_gps_l1_acq_test(void* arguments) return nullptr; } - //************************************************************************** + // ************************************************************************* // Open input file - //************************************************************************** + // ************************************************************************* uint32_t skip_samples = 0; // static_cast(FLAGS_skip_samples); if (skip_samples + skip_used_samples > 0) diff --git a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test_fpga.cc index d3fbaf8fb..9e40ab53c 100644 --- a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test_fpga.cc @@ -399,9 +399,9 @@ void* handler_DMA_obs_test(void* arguments) return nullptr; } - //************************************************************************** + // ************************************************************************* // Open DMA device - //************************************************************************** + // ************************************************************************* tx_fd = open("/dev/loop_tx", O_WRONLY); if (tx_fd < 0) { @@ -409,9 +409,9 @@ void* handler_DMA_obs_test(void* arguments) return nullptr; } - //************************************************************************** + // ************************************************************************* // Open input file - //************************************************************************** + // ************************************************************************* uint32_t skip_samples = static_cast(FLAGS_skip_samples); diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc index 8d68997fc..dedfcb658 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc @@ -191,9 +191,9 @@ void* handler_DMA_trk_pull_in_test(void* arguments) return nullptr; } - //************************************************************************** + // ************************************************************************* // Open DMA device - //************************************************************************** + // ************************************************************************* tx_fd = open("/dev/loop_tx", O_WRONLY); if (tx_fd < 0) { @@ -201,9 +201,9 @@ void* handler_DMA_trk_pull_in_test(void* arguments) return nullptr; } - //************************************************************************** + // ************************************************************************* // Open input file - //************************************************************************** + // ************************************************************************* uint32_t skip_samples = static_cast(FLAGS_skip_samples); if (skip_samples + skip_used_samples > 0)