mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-24 20:17:39 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into release_0010
This commit is contained in:
@@ -86,11 +86,6 @@ if(OPENCL_FOUND)
|
||||
opencl/fft_setup.cc # Needs OpenCL
|
||||
opencl/fft_kernelstring.cc # Needs OpenCL
|
||||
)
|
||||
set(GNSS_SPLIBS_HEADERS ${GNSS_SPLIBS_HEADERS}
|
||||
opencl/fft_execute.h # Needs OpenCL
|
||||
opencl/fft_setup.h # Needs OpenCL
|
||||
opencl/fft_kernelstring.h # Needs OpenCL
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
|
||||
@@ -68,7 +68,7 @@ void galileo_e1_code_gen_int(int* _dest, char _Signal[3], int32_t _prn)
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_sinboc_11_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
void galileo_e1_sinboc_11_gen_int(int* _dest, const int* _prn, uint32_t _length_out)
|
||||
{
|
||||
const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
auto _period = static_cast<uint32_t>(_length_out / _length_in);
|
||||
@@ -86,7 +86,7 @@ void galileo_e1_sinboc_11_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_sinboc_61_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
void galileo_e1_sinboc_61_gen_int(int* _dest, const int* _prn, uint32_t _length_out)
|
||||
{
|
||||
const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
auto _period = static_cast<uint32_t>(_length_out / _length_in);
|
||||
@@ -236,7 +236,7 @@ void galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signa
|
||||
std::string _galileo_signal = _Signal;
|
||||
const int32_t _codeFreqBasis = Galileo_E1_CODE_CHIP_RATE_HZ; // Hz
|
||||
auto _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) /
|
||||
(static_cast<double>(_codeFreqBasis) / static_cast<double>(Galileo_E1_B_CODE_LENGTH_CHIPS)));
|
||||
(static_cast<double>(_codeFreqBasis) / static_cast<double>(Galileo_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
|
||||
|
||||
void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _prn, char _Signal[3])
|
||||
void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _prn, const char _Signal[3])
|
||||
{
|
||||
uint32_t prn = _prn - 1;
|
||||
uint32_t index = 0;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* \brief Generates Galileo E5a code at 1 sample/chip
|
||||
* bool _pilot generates E5aQ code if true and E5aI (data signal) if false.
|
||||
*/
|
||||
void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _prn, char _Signal[3]);
|
||||
void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _prn, const char _Signal[3]);
|
||||
|
||||
void galileo_e5_a_code_gen_tiered(std::complex<float>* _dest, std::complex<float>* _primary, uint32_t _prn, char _Signal[3]);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ void glonass_l1_ca_code_gen_complex(std::complex<float>* _dest, /* int32_t _prn
|
||||
|
||||
for (lcv = 0; lcv < 9; lcv++)
|
||||
{
|
||||
G1_register[lcv] = 1;
|
||||
G1_register[lcv] = true;
|
||||
}
|
||||
|
||||
/* Generate G1 Register */
|
||||
|
||||
@@ -46,7 +46,7 @@ void glonass_l2_ca_code_gen_complex(std::complex<float>* _dest, /* int32_t _prn,
|
||||
|
||||
for (lcv = 0; lcv < 9; lcv++)
|
||||
{
|
||||
G1_register[lcv] = 1;
|
||||
G1_register[lcv] = true;
|
||||
}
|
||||
|
||||
/* Generate G1 Register */
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
|
||||
#ifndef GNSS_SDR_CIRCULAR_DEQUE_H_
|
||||
#define GNSS_SDR_CIRCULAR_DEQUE_H_
|
||||
#include <vector>
|
||||
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <vector>
|
||||
|
||||
template <class T>
|
||||
class Gnss_circular_deque
|
||||
|
||||
@@ -31,22 +31,23 @@
|
||||
|
||||
#include "gnss_sdr_fpga_sample_counter.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <cinttypes>
|
||||
#include <cmath>
|
||||
#include <fcntl.h> // libraries used by the GIPO
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <glog/logging.h>
|
||||
#include <fcntl.h> // libraries used by the GIPO
|
||||
#include <sys/mman.h> // libraries used by the GIPO
|
||||
|
||||
#include <inttypes.h>
|
||||
#define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map
|
||||
#define TEST_REG_SANITY_CHECK 0x55AA // value to check the presence of the test register (to detect the hw)
|
||||
|
||||
#define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map
|
||||
#define TEST_REG_SANITY_CHECK 0x55AA // value to check the presence of the test register (to detect the hw)
|
||||
|
||||
gnss_sdr_fpga_sample_counter::gnss_sdr_fpga_sample_counter(double _fs, int32_t _interval_ms) : gr::block("fpga_fpga_sample_counter",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||
gnss_sdr_fpga_sample_counter::gnss_sdr_fpga_sample_counter(
|
||||
double _fs,
|
||||
int32_t _interval_ms) : gr::block("fpga_fpga_sample_counter",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||
{
|
||||
message_port_register_out(pmt::mp("fpga_sample_counter"));
|
||||
set_max_noutput_items(1);
|
||||
@@ -88,10 +89,10 @@ bool gnss_sdr_fpga_sample_counter::start()
|
||||
{
|
||||
//todo: place here the RE-INITIALIZATION routines. This function will be called by GNURadio at every start of the flowgraph.
|
||||
|
||||
// configure the number of samples per output in the FPGA and enable the interrupts
|
||||
// configure the number of samples per output in the FPGA and enable the interrupts
|
||||
configure_samples_per_output(samples_per_output);
|
||||
|
||||
// return true if everything is ok.
|
||||
// return true if everything is ok.
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -101,7 +102,7 @@ bool gnss_sdr_fpga_sample_counter::stop()
|
||||
{
|
||||
//todo: place here the routines to stop the associated hardware (if needed).This function will be called by GNURadio at every stop of the flowgraph.
|
||||
// return true if everything is ok.
|
||||
close_device();
|
||||
close_device();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -119,16 +120,16 @@ int gnss_sdr_fpga_sample_counter::general_work(int noutput_items __attribute__((
|
||||
// Possible problem: what happen if the PS is overloaded and gnuradio does not call this function
|
||||
// with the sufficient rate to catch all the interrupts in the counter. To be evaluated later.
|
||||
|
||||
uint32_t counter = wait_for_interrupt_and_read_counter();
|
||||
uint64_t samples_passed = 2*static_cast<uint64_t>(samples_per_output) - static_cast<uint64_t>(counter); // ellapsed samples
|
||||
//printf("============================================ interrupter : samples_passed = %" PRIu64 "\n", samples_passed);
|
||||
// Note: at this moment the sample counter is implemented as a sample counter that decreases to zero and then it is automatically
|
||||
// reloaded again and keeps counter. It is done in this way to minimize the logic in the FPGA and maximize the FPGA clock performance
|
||||
// (it takes less resources and latency in the FPGA to compare a number against a fixed value like zero than to compare it to a programmable
|
||||
// variable number).
|
||||
uint32_t counter = wait_for_interrupt_and_read_counter();
|
||||
uint64_t samples_passed = 2 * static_cast<uint64_t>(samples_per_output) - static_cast<uint64_t>(counter); // ellapsed samples
|
||||
//printf("============================================ interrupter : samples_passed = %" PRIu64 "\n", samples_passed);
|
||||
// Note: at this moment the sample counter is implemented as a sample counter that decreases to zero and then it is automatically
|
||||
// reloaded again and keeps counter. It is done in this way to minimize the logic in the FPGA and maximize the FPGA clock performance
|
||||
// (it takes less resources and latency in the FPGA to compare a number against a fixed value like zero than to compare it to a programmable
|
||||
// variable number).
|
||||
|
||||
sample_counter = sample_counter + samples_passed; //samples_per_output;
|
||||
Gnss_Synchro *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]);
|
||||
sample_counter = sample_counter + samples_passed; //samples_per_output;
|
||||
auto *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]);
|
||||
out[0] = Gnss_Synchro();
|
||||
out[0].Flag_valid_symbol_output = false;
|
||||
out[0].Flag_valid_word = false;
|
||||
@@ -136,11 +137,11 @@ int gnss_sdr_fpga_sample_counter::general_work(int noutput_items __attribute__((
|
||||
out[0].fs = fs;
|
||||
if ((current_T_rx_ms % report_interval_ms) == 0)
|
||||
{
|
||||
//printf("time to print sample_counter = %" PRIu64 "\n", sample_counter);
|
||||
//printf("time to print current Tx ms : %" PRIu64 "\n", current_T_rx_ms);
|
||||
//printf("time to print report_interval_ms : %" PRIu32 "\n", report_interval_ms);
|
||||
//printf("time to print %f\n", (current_T_rx_ms % report_interval_ms));
|
||||
current_s++;
|
||||
//printf("time to print sample_counter = %" PRIu64 "\n", sample_counter);
|
||||
//printf("time to print current Tx ms : %" PRIu64 "\n", current_T_rx_ms);
|
||||
//printf("time to print report_interval_ms : %" PRIu32 "\n", report_interval_ms);
|
||||
//printf("time to print %f\n", (current_T_rx_ms % report_interval_ms));
|
||||
current_s++;
|
||||
if ((current_s % 60) == 0)
|
||||
{
|
||||
current_s = 0;
|
||||
@@ -198,7 +199,7 @@ int gnss_sdr_fpga_sample_counter::general_work(int noutput_items __attribute__((
|
||||
}
|
||||
out[0].Tracking_sample_counter = sample_counter;
|
||||
//current_T_rx_ms = (sample_counter * 1000) / samples_per_output;
|
||||
current_T_rx_ms = interval_ms*(sample_counter) / samples_per_output;
|
||||
current_T_rx_ms = interval_ms * (sample_counter) / samples_per_output;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -215,16 +216,16 @@ uint32_t gnss_sdr_fpga_sample_counter::test_register(uint32_t writeval)
|
||||
|
||||
void gnss_sdr_fpga_sample_counter::configure_samples_per_output(uint32_t interval)
|
||||
{
|
||||
// note : the counter is a 48-bit value in the HW.
|
||||
//printf("============================================ total counter - interrupted interval : %" PRIu32 "\n", interval);
|
||||
//uint64_t temp_interval;
|
||||
//temp_interval = (interval & static_cast<uint32_t>(0xFFFFFFFF));
|
||||
//printf("LSW counter - interrupted interval : %" PRIu32 "\n", static_cast<uint32_t>(temp_interval));
|
||||
//map_base[0] = static_cast<uint32_t>(temp_interval);
|
||||
map_base[0] = interval - 1;
|
||||
//temp_interval = (interval >> 32) & static_cast<uint32_t>(0xFFFFFFFF);
|
||||
//printf("MSbits counter - interrupted interval : %" PRIu32 "\n", static_cast<uint32_t>(temp_interval));
|
||||
//map_base[1] = static_cast<uint32_t>(temp_interval); // writing the most significant bits also enables the interrupts
|
||||
// note : the counter is a 48-bit value in the HW.
|
||||
//printf("============================================ total counter - interrupted interval : %" PRIu32 "\n", interval);
|
||||
//uint64_t temp_interval;
|
||||
//temp_interval = (interval & static_cast<uint32_t>(0xFFFFFFFF));
|
||||
//printf("LSW counter - interrupted interval : %" PRIu32 "\n", static_cast<uint32_t>(temp_interval));
|
||||
//map_base[0] = static_cast<uint32_t>(temp_interval);
|
||||
map_base[0] = interval - 1;
|
||||
//temp_interval = (interval >> 32) & static_cast<uint32_t>(0xFFFFFFFF);
|
||||
//printf("MSbits counter - interrupted interval : %" PRIu32 "\n", static_cast<uint32_t>(temp_interval));
|
||||
//map_base[1] = static_cast<uint32_t>(temp_interval); // writing the most significant bits also enables the interrupts
|
||||
}
|
||||
|
||||
void gnss_sdr_fpga_sample_counter::open_device()
|
||||
@@ -235,7 +236,7 @@ void gnss_sdr_fpga_sample_counter::open_device()
|
||||
LOG(WARNING) << "Cannot open deviceio" << device_name;
|
||||
std::cout << "Counter-Intr: cannot open deviceio" << device_name << std::endl;
|
||||
}
|
||||
map_base = reinterpret_cast<volatile uint32_t *>(mmap(NULL, PAGE_SIZE,
|
||||
map_base = reinterpret_cast<volatile uint32_t *>(mmap(nullptr, PAGE_SIZE,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0));
|
||||
|
||||
if (map_base == reinterpret_cast<void *>(-1))
|
||||
@@ -261,10 +262,10 @@ void gnss_sdr_fpga_sample_counter::open_device()
|
||||
|
||||
void gnss_sdr_fpga_sample_counter::close_device()
|
||||
{
|
||||
//printf("=========================================== NOW closing device ...\n");
|
||||
map_base[2] = 0; // disable the generation of the interrupt in the device
|
||||
//printf("=========================================== NOW closing device ...\n");
|
||||
map_base[2] = 0; // disable the generation of the interrupt in the device
|
||||
|
||||
uint32_t *aux = const_cast<uint32_t *>(map_base);
|
||||
auto *aux = const_cast<uint32_t *>(map_base);
|
||||
if (munmap(static_cast<void *>(aux), PAGE_SIZE) == -1)
|
||||
{
|
||||
printf("Failed to unmap memory uio\n");
|
||||
@@ -294,12 +295,9 @@ uint32_t gnss_sdr_fpga_sample_counter::wait_for_interrupt_and_read_counter()
|
||||
}
|
||||
|
||||
// acknowledge the interrupt
|
||||
map_base[1] = 0; // writing anything to reg 1 acknowledges the interrupt
|
||||
map_base[1] = 0; // writing anything to reg 1 acknowledges the interrupt
|
||||
|
||||
// add number of passed samples or read the current counter value for more accuracy
|
||||
counter = samples_per_output; //map_base[0];
|
||||
counter = samples_per_output; //map_base[0];
|
||||
return counter;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef GNSS_SDR_FPGA_sample_counter_H_
|
||||
#define GNSS_SDR_FPGA_sample_counter_H_
|
||||
|
||||
#include <gnuradio/block.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/block.h>
|
||||
#include <cstdint>
|
||||
|
||||
class gnss_sdr_fpga_sample_counter;
|
||||
@@ -57,18 +57,18 @@ private:
|
||||
uint64_t sample_counter;
|
||||
uint32_t interval_ms;
|
||||
uint64_t current_T_rx_ms; // Receiver time in ms since the beginning of the run
|
||||
uint32_t current_s; // Receiver time in seconds, modulo 60
|
||||
bool flag_m; // True if the receiver has been running for at least 1 minute
|
||||
uint32_t current_m; // Receiver time in minutes, modulo 60
|
||||
bool flag_h; // True if the receiver has been running for at least 1 hour
|
||||
uint32_t current_h; // Receiver time in hours, modulo 24
|
||||
bool flag_days; // True if the receiver has been running for at least 1 day
|
||||
uint32_t current_days; // Receiver time in days since the beginning of the run
|
||||
uint32_t current_s; // Receiver time in seconds, modulo 60
|
||||
bool flag_m; // True if the receiver has been running for at least 1 minute
|
||||
uint32_t current_m; // Receiver time in minutes, modulo 60
|
||||
bool flag_h; // True if the receiver has been running for at least 1 hour
|
||||
uint32_t current_h; // Receiver time in hours, modulo 24
|
||||
bool flag_days; // True if the receiver has been running for at least 1 day
|
||||
uint32_t current_days; // Receiver time in days since the beginning of the run
|
||||
int32_t report_interval_ms;
|
||||
bool flag_enable_send_msg;
|
||||
int32_t fd; // driver descriptor
|
||||
volatile uint32_t *map_base; // driver memory map
|
||||
std::string device_name = "/dev/uio26"; // HW device name
|
||||
int32_t fd; // driver descriptor
|
||||
volatile uint32_t *map_base; // driver memory map
|
||||
std::string device_name = "/dev/uio26"; // HW device name
|
||||
|
||||
public:
|
||||
friend gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int32_t _interval_ms);
|
||||
|
||||
@@ -36,10 +36,13 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
gnss_sdr_sample_counter::gnss_sdr_sample_counter(double _fs, int32_t _interval_ms, size_t _size) : gr::sync_decimator("sample_counter",
|
||||
gr::io_signature::make(1, 1, _size),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||
static_cast<uint32_t>(std::round(_fs * static_cast<double>(_interval_ms) / 1e3)))
|
||||
gnss_sdr_sample_counter::gnss_sdr_sample_counter(
|
||||
double _fs,
|
||||
int32_t _interval_ms,
|
||||
size_t _size) : gr::sync_decimator("sample_counter",
|
||||
gr::io_signature::make(1, 1, _size),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
|
||||
static_cast<uint32_t>(std::round(_fs * static_cast<double>(_interval_ms) / 1e3)))
|
||||
{
|
||||
message_port_register_out(pmt::mp("sample_counter"));
|
||||
set_max_noutput_items(1);
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef GNSS_SDR_SAMPLE_COUNTER_H_
|
||||
#define GNSS_SDR_SAMPLE_COUNTER_H_
|
||||
|
||||
#include <gnuradio/sync_decimator.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/sync_decimator.h>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@@ -40,7 +40,10 @@ class gnss_sdr_sample_counter;
|
||||
|
||||
typedef boost::shared_ptr<gnss_sdr_sample_counter> gnss_sdr_sample_counter_sptr;
|
||||
|
||||
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size);
|
||||
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(
|
||||
double _fs,
|
||||
int32_t _interval_ms,
|
||||
size_t _size);
|
||||
|
||||
class gnss_sdr_sample_counter : public gr::sync_decimator
|
||||
{
|
||||
|
||||
@@ -61,10 +61,10 @@ gnss_sdr_time_counter_sptr gnss_sdr_make_time_counter()
|
||||
|
||||
|
||||
int gnss_sdr_time_counter::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items __attribute__((unused)), gr_vector_void_star &output_items)
|
||||
gr_vector_const_void_star &input_items __attribute__((unused)), gr_vector_void_star &output_items)
|
||||
{
|
||||
Gnss_Synchro *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]);
|
||||
const Gnss_Synchro *in = reinterpret_cast<const Gnss_Synchro *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const Gnss_Synchro *>(input_items[0]);
|
||||
out[0] = in[0];
|
||||
if ((current_T_rx_ms % report_interval_ms) == 0)
|
||||
{
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef GNSS_SDR_TIME_COUNTER_H_
|
||||
#define GNSS_SDR_TIME_COUNTER_H_
|
||||
|
||||
#include <gnuradio/block.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/block.h>
|
||||
#include <cstdint>
|
||||
|
||||
class gnss_sdr_time_counter;
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
#ifndef GNSS_SDR_GNSS_SDR_VALVE_H_
|
||||
#define GNSS_SDR_GNSS_SDR_VALVE_H_
|
||||
|
||||
#include <gnuradio/sync_block.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/sync_block.h>
|
||||
#include <cstdint>
|
||||
|
||||
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
std::deque<bool> l5i_xa_shift(std::deque<bool> xa)
|
||||
{
|
||||
if (xa == std::deque<bool>{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1})
|
||||
if (xa == std::deque<bool>{true, true, true, true, true, true, true, true, true, true, true, false, true})
|
||||
{
|
||||
return std::deque<bool>{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
return std::deque<bool>{true, true, true, true, true, true, true, true, true, true, true, true, true};
|
||||
}
|
||||
std::deque<bool> out(xa.begin(), xa.end() - 1);
|
||||
out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]);
|
||||
@@ -52,9 +52,9 @@ std::deque<bool> l5i_xa_shift(std::deque<bool> xa)
|
||||
|
||||
std::deque<bool> l5q_xa_shift(std::deque<bool> xa)
|
||||
{
|
||||
if (xa == std::deque<bool>{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1})
|
||||
if (xa == std::deque<bool>{true, true, true, true, true, true, true, true, true, true, true, false, true})
|
||||
{
|
||||
return std::deque<bool>{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
return std::deque<bool>{true, true, true, true, true, true, true, true, true, true, true, true, true};
|
||||
}
|
||||
std::deque<bool> out(xa.begin(), xa.end() - 1);
|
||||
out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]);
|
||||
@@ -80,8 +80,8 @@ std::deque<bool> l5q_xb_shift(std::deque<bool> xb)
|
||||
|
||||
std::deque<bool> make_l5i_xa()
|
||||
{
|
||||
std::deque<bool> xa = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
std::deque<bool> y(GPS_L5i_CODE_LENGTH_CHIPS, 0);
|
||||
std::deque<bool> xa = {true, true, true, true, true, true, true, true, true, true, true, true, true};
|
||||
std::deque<bool> y(GPS_L5i_CODE_LENGTH_CHIPS, false);
|
||||
|
||||
for (int32_t i = 0; i < GPS_L5i_CODE_LENGTH_CHIPS; i++)
|
||||
{
|
||||
@@ -94,8 +94,8 @@ std::deque<bool> make_l5i_xa()
|
||||
|
||||
std::deque<bool> make_l5i_xb()
|
||||
{
|
||||
std::deque<bool> xb = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
std::deque<bool> y(GPS_L5i_CODE_LENGTH_CHIPS, 0);
|
||||
std::deque<bool> xb = {true, true, true, true, true, true, true, true, true, true, true, true, true};
|
||||
std::deque<bool> y(GPS_L5i_CODE_LENGTH_CHIPS, false);
|
||||
|
||||
for (int32_t i = 0; i < GPS_L5i_CODE_LENGTH_CHIPS; i++)
|
||||
{
|
||||
@@ -108,8 +108,8 @@ std::deque<bool> make_l5i_xb()
|
||||
|
||||
std::deque<bool> make_l5q_xa()
|
||||
{
|
||||
std::deque<bool> xa = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
std::deque<bool> y(GPS_L5q_CODE_LENGTH_CHIPS, 0);
|
||||
std::deque<bool> xa = {true, true, true, true, true, true, true, true, true, true, true, true, true};
|
||||
std::deque<bool> y(GPS_L5q_CODE_LENGTH_CHIPS, false);
|
||||
|
||||
for (int32_t i = 0; i < GPS_L5q_CODE_LENGTH_CHIPS; i++)
|
||||
{
|
||||
@@ -122,8 +122,8 @@ std::deque<bool> make_l5q_xa()
|
||||
|
||||
std::deque<bool> make_l5q_xb()
|
||||
{
|
||||
std::deque<bool> xb = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
|
||||
std::deque<bool> y(GPS_L5q_CODE_LENGTH_CHIPS, 0);
|
||||
std::deque<bool> xb = {true, true, true, true, true, true, true, true, true, true, true, true, true};
|
||||
std::deque<bool> y(GPS_L5q_CODE_LENGTH_CHIPS, false);
|
||||
|
||||
for (int32_t i = 0; i < GPS_L5q_CODE_LENGTH_CHIPS; i++)
|
||||
{
|
||||
@@ -140,13 +140,13 @@ void make_l5i(int32_t* _dest, int32_t prn)
|
||||
|
||||
std::deque<bool> xb = make_l5i_xb();
|
||||
std::deque<bool> xa = make_l5i_xa();
|
||||
std::deque<bool> xb_shift(GPS_L5i_CODE_LENGTH_CHIPS, 0);
|
||||
std::deque<bool> xb_shift(GPS_L5i_CODE_LENGTH_CHIPS, false);
|
||||
|
||||
for (int32_t n = 0; n < GPS_L5i_CODE_LENGTH_CHIPS; n++)
|
||||
{
|
||||
xb_shift[n] = xb[(xb_offset + n) % GPS_L5i_CODE_LENGTH_CHIPS];
|
||||
}
|
||||
std::deque<bool> out_code(GPS_L5i_CODE_LENGTH_CHIPS, 0);
|
||||
std::deque<bool> out_code(GPS_L5i_CODE_LENGTH_CHIPS, false);
|
||||
for (int32_t n = 0; n < GPS_L5i_CODE_LENGTH_CHIPS; n++)
|
||||
{
|
||||
_dest[n] = xa[n] xor xb_shift[n];
|
||||
@@ -160,13 +160,13 @@ void make_l5q(int32_t* _dest, int32_t prn)
|
||||
|
||||
std::deque<bool> xb = make_l5q_xb();
|
||||
std::deque<bool> xa = make_l5q_xa();
|
||||
std::deque<bool> xb_shift(GPS_L5q_CODE_LENGTH_CHIPS, 0);
|
||||
std::deque<bool> xb_shift(GPS_L5q_CODE_LENGTH_CHIPS, false);
|
||||
|
||||
for (int32_t n = 0; n < GPS_L5q_CODE_LENGTH_CHIPS; n++)
|
||||
{
|
||||
xb_shift[n] = xb[(xb_offset + n) % GPS_L5q_CODE_LENGTH_CHIPS];
|
||||
}
|
||||
std::deque<bool> out_code(GPS_L5q_CODE_LENGTH_CHIPS, 0);
|
||||
std::deque<bool> out_code(GPS_L5q_CODE_LENGTH_CHIPS, false);
|
||||
for (int32_t n = 0; n < GPS_L5q_CODE_LENGTH_CHIPS; n++)
|
||||
{
|
||||
_dest[n] = xa[n] xor xb_shift[n];
|
||||
|
||||
@@ -68,8 +68,8 @@ void gps_l1_ca_code_gen_int(int32_t* _dest, int32_t _prn, uint32_t _chip_shift)
|
||||
|
||||
for (lcv = 0; lcv < 10; lcv++)
|
||||
{
|
||||
G1_register[lcv] = 1;
|
||||
G2_register[lcv] = 1;
|
||||
G1_register[lcv] = true;
|
||||
G2_register[lcv] = true;
|
||||
}
|
||||
|
||||
/* Generate G1 & G2 Register */
|
||||
|
||||
@@ -23,15 +23,15 @@
|
||||
|
||||
/*! \file
|
||||
*
|
||||
* \brief C++ bindings for OpenCL 1.0 (rev 48), OpenCL 1.1 (rev 33) and
|
||||
* OpenCL 1.2 (rev 15)
|
||||
* \brief C++ bindings for OpenCL 1.0 (rev 48), OpenCL 1.1 (rev 33) and
|
||||
* OpenCL 1.2 (rev 15)
|
||||
* \author Benedict R. Gaster, Laurent Morichetti and Lee Howes
|
||||
*
|
||||
*
|
||||
* Additions and fixes from:
|
||||
* Brian Cole, March 3rd 2010 and April 2012
|
||||
* Brian Cole, March 3rd 2010 and April 2012
|
||||
* Matt Gruenke, April 2012.
|
||||
* Bruce Merry, February 2013.
|
||||
*
|
||||
*
|
||||
* \version 1.2.5
|
||||
* \date June 2013
|
||||
*
|
||||
@@ -71,7 +71,7 @@
|
||||
*
|
||||
* \code
|
||||
* #define __CL_ENABLE_EXCEPTIONS
|
||||
*
|
||||
*
|
||||
* #if defined(__APPLE__) || defined(__MACOSX)
|
||||
* #include <OpenCL/cl.hpp>
|
||||
* #else
|
||||
@@ -80,13 +80,13 @@
|
||||
* #include <cstdio>
|
||||
* #include <cstdlib>
|
||||
* #include <iostream>
|
||||
*
|
||||
*
|
||||
* const char * helloStr = "__kernel void "
|
||||
* "hello(void) "
|
||||
* "{ "
|
||||
* " "
|
||||
* "} ";
|
||||
*
|
||||
*
|
||||
* int
|
||||
* main(void)
|
||||
* {
|
||||
@@ -100,33 +100,33 @@
|
||||
* return -1;
|
||||
* }
|
||||
*
|
||||
* cl_context_properties properties[] =
|
||||
* cl_context_properties properties[] =
|
||||
* { CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[0])(), 0};
|
||||
* cl::Context context(CL_DEVICE_TYPE_CPU, properties);
|
||||
*
|
||||
* cl::Context context(CL_DEVICE_TYPE_CPU, properties);
|
||||
*
|
||||
* std::vector<cl::Device> devices = context.getInfo<CL_CONTEXT_DEVICES>();
|
||||
*
|
||||
*
|
||||
* cl::Program::Sources source(1,
|
||||
* std::make_pair(helloStr,strlen(helloStr)));
|
||||
* cl::Program program_ = cl::Program(context, source);
|
||||
* program_.build(devices);
|
||||
*
|
||||
*
|
||||
* cl::Kernel kernel(program_, "hello", &err);
|
||||
*
|
||||
*
|
||||
* cl::Event event;
|
||||
* cl::CommandQueue queue(context, devices[0], 0, &err);
|
||||
* queue.enqueueNDRangeKernel(
|
||||
* kernel,
|
||||
* cl::NullRange,
|
||||
* kernel,
|
||||
* cl::NullRange,
|
||||
* cl::NDRange(4,4),
|
||||
* cl::NullRange,
|
||||
* NULL,
|
||||
* &event);
|
||||
*
|
||||
* &event);
|
||||
*
|
||||
* event.wait();
|
||||
* }
|
||||
* catch (cl::Error err) {
|
||||
* std::cerr
|
||||
* std::cerr
|
||||
* << "ERROR: "
|
||||
* << err.what()
|
||||
* << "("
|
||||
@@ -134,10 +134,10 @@
|
||||
* << ")"
|
||||
* << std::endl;
|
||||
* }
|
||||
*
|
||||
*
|
||||
* return EXIT_SUCCESS;
|
||||
* }
|
||||
*
|
||||
*
|
||||
* \endcode
|
||||
*
|
||||
*/
|
||||
@@ -146,10 +146,10 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <windows.h>
|
||||
#include <malloc.h>
|
||||
#include <iterator>
|
||||
#include <intrin.h>
|
||||
#include <iterator>
|
||||
#include <malloc.h>
|
||||
#include <windows.h>
|
||||
|
||||
#if defined(__CL_ENABLE_EXCEPTIONS)
|
||||
#include <exception>
|
||||
@@ -169,12 +169,12 @@
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) || defined(__MACOSX)
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#include <OpenCL/opencl.h>
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#include <libkern/OSAtomic.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#include <CL/opencl.h>
|
||||
#include <GL/gl.h>
|
||||
#endif // !__APPLE__
|
||||
|
||||
// To avoid accidentally taking ownership of core OpenCL types
|
||||
@@ -199,8 +199,8 @@
|
||||
#define CL_CALLBACK
|
||||
#endif //CL_CALLBACK
|
||||
|
||||
#include <utility>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(__NO_STD_VECTOR)
|
||||
#include <vector>
|
||||
@@ -212,7 +212,6 @@
|
||||
|
||||
#if defined(linux) || defined(__APPLE__) || defined(__MACOSX)
|
||||
#include <alloca.h>
|
||||
|
||||
#include <emmintrin.h>
|
||||
#include <xmmintrin.h>
|
||||
#endif // linux
|
||||
@@ -264,8 +263,8 @@ class Memory;
|
||||
class Buffer;
|
||||
|
||||
#if defined(__CL_ENABLE_EXCEPTIONS)
|
||||
/*! \brief Exception class
|
||||
*
|
||||
/*! \brief Exception class
|
||||
*
|
||||
* This may be thrown by API functions when __CL_ENABLE_EXCEPTIONS is defined.
|
||||
*/
|
||||
class Error : public std::exception
|
||||
@@ -277,7 +276,7 @@ private:
|
||||
public:
|
||||
/*! \brief Create a new CL error exception for a given error code
|
||||
* and corresponding message.
|
||||
*
|
||||
*
|
||||
* \param err error code value.
|
||||
*
|
||||
* \param errStr a descriptive string that must remain in scope until
|
||||
@@ -476,7 +475,7 @@ typedef std::string STRING_CLASS;
|
||||
/*! \class string
|
||||
* \brief Simple string class, that provides a limited subset of std::string
|
||||
* functionality but avoids many of the issues that come with that class.
|
||||
|
||||
|
||||
* \note Deprecated. Please use std::string as default or
|
||||
* re-define the string class to match the std::string
|
||||
* interface by defining STRING_CLASS
|
||||
@@ -495,10 +494,10 @@ public:
|
||||
|
||||
/*! \brief Constructs a string populated from an arbitrary value of
|
||||
* specified size.
|
||||
*
|
||||
*
|
||||
* An extra '\0' is added, in case none was contained in str.
|
||||
*
|
||||
* \param str the initial value of the string instance. Note that '\0'
|
||||
* \param str the initial value of the string instance. Note that '\0'
|
||||
* characters receive no special treatment. If NULL,
|
||||
* the string is left empty, with a size of 0.
|
||||
*
|
||||
@@ -678,7 +677,7 @@ typedef cl::string STRING_CLASS;
|
||||
#endif
|
||||
|
||||
/*! \class vector
|
||||
* \brief Fixed sized vector implementation that mirroring
|
||||
* \brief Fixed sized vector implementation that mirroring
|
||||
*
|
||||
* \note Deprecated. Please use std::vector as default or
|
||||
* re-define the vector class to match the std::vector
|
||||
@@ -738,7 +737,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Appends an element after the last valid element.
|
||||
* Calling this on a vector that has reached capacity will throw an
|
||||
* Calling this on a vector that has reached capacity will throw an
|
||||
* exception if exceptions are enabled.
|
||||
*/
|
||||
void push_back(const T& x)
|
||||
@@ -921,7 +920,7 @@ public:
|
||||
|
||||
/**
|
||||
* Internal iterator constructor to capture reference
|
||||
* to the vector it iterates over rather than taking
|
||||
* to the vector it iterates over rather than taking
|
||||
* the vector by copy.
|
||||
*/
|
||||
iterator(const vector<T, N>& vec, int index) : vec_(&vec)
|
||||
@@ -1617,7 +1616,7 @@ struct ReferenceHandler<cl_device_id>
|
||||
/**
|
||||
* Retain the device.
|
||||
* \param device A valid device created using createSubDevices
|
||||
* \return
|
||||
* \return
|
||||
* CL_SUCCESS if the function executed successfully.
|
||||
* CL_INVALID_DEVICE if device was not a valid subdevice
|
||||
* CL_OUT_OF_RESOURCES
|
||||
@@ -1630,7 +1629,7 @@ struct ReferenceHandler<cl_device_id>
|
||||
/**
|
||||
* Retain the device.
|
||||
* \param device A valid device created using createSubDevices
|
||||
* \return
|
||||
* \return
|
||||
* CL_SUCCESS if the function executed successfully.
|
||||
* CL_INVALID_DEVICE if device was not a valid subdevice
|
||||
* CL_OUT_OF_RESOURCES
|
||||
@@ -2055,13 +2054,13 @@ public:
|
||||
Device() : detail::Wrapper<cl_type>() {}
|
||||
|
||||
/*! \brief Copy constructor.
|
||||
*
|
||||
*
|
||||
* This simply copies the device ID value, which is an inexpensive operation.
|
||||
*/
|
||||
Device(const Device& device) : detail::Wrapper<cl_type>(device) {}
|
||||
|
||||
/*! \brief Constructor from cl_device_id.
|
||||
*
|
||||
*
|
||||
* This simply copies the device ID value, which is an inexpensive operation.
|
||||
*/
|
||||
Device(const cl_device_id& device) : detail::Wrapper<cl_type>(device) {}
|
||||
@@ -2073,7 +2072,7 @@ public:
|
||||
static Device getDefault(cl_int* err = NULL);
|
||||
|
||||
/*! \brief Assignment operator from Device.
|
||||
*
|
||||
*
|
||||
* This simply copies the device ID value, which is an inexpensive operation.
|
||||
*/
|
||||
Device& operator=(const Device& rhs)
|
||||
@@ -2086,7 +2085,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Assignment operator from cl_device_id.
|
||||
*
|
||||
*
|
||||
* This simply copies the device ID value, which is an inexpensive operation.
|
||||
*/
|
||||
Device& operator=(const cl_device_id& rhs)
|
||||
@@ -2201,19 +2200,19 @@ public:
|
||||
Platform() : detail::Wrapper<cl_type>() {}
|
||||
|
||||
/*! \brief Copy constructor.
|
||||
*
|
||||
*
|
||||
* This simply copies the platform ID value, which is an inexpensive operation.
|
||||
*/
|
||||
Platform(const Platform& platform) : detail::Wrapper<cl_type>(platform) {}
|
||||
|
||||
/*! \brief Constructor from cl_platform_id.
|
||||
*
|
||||
*
|
||||
* This simply copies the platform ID value, which is an inexpensive operation.
|
||||
*/
|
||||
Platform(const cl_platform_id& platform) : detail::Wrapper<cl_type>(platform) {}
|
||||
|
||||
/*! \brief Assignment operator from Platform.
|
||||
*
|
||||
*
|
||||
* This simply copies the platform ID value, which is an inexpensive operation.
|
||||
*/
|
||||
Platform& operator=(const Platform& rhs)
|
||||
@@ -2226,7 +2225,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Assignment operator from cl_platform_id.
|
||||
*
|
||||
*
|
||||
* This simply copies the platform ID value, which is an inexpensive operation.
|
||||
*/
|
||||
Platform& operator=(const cl_platform_id& rhs)
|
||||
@@ -2259,7 +2258,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Gets a list of devices for this platform.
|
||||
*
|
||||
*
|
||||
* Wraps clGetDeviceIDs().
|
||||
*/
|
||||
cl_int getDevices(
|
||||
@@ -2369,7 +2368,7 @@ public:
|
||||
#endif
|
||||
|
||||
/*! \brief Gets a list of available platforms.
|
||||
*
|
||||
*
|
||||
* Wraps clGetPlatformIDs().
|
||||
*/
|
||||
static cl_int get(
|
||||
@@ -2401,7 +2400,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Gets the first available platform.
|
||||
*
|
||||
*
|
||||
* Wraps clGetPlatformIDs(), returning the first result.
|
||||
*/
|
||||
static cl_int get(
|
||||
@@ -2433,7 +2432,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Gets the first available platform, returning it by value.
|
||||
*
|
||||
*
|
||||
* Wraps clGetPlatformIDs(), returning the first result.
|
||||
*/
|
||||
static Platform get(
|
||||
@@ -2694,20 +2693,20 @@ public:
|
||||
Context() : detail::Wrapper<cl_type>() {}
|
||||
|
||||
/*! \brief Copy constructor.
|
||||
*
|
||||
*
|
||||
* This calls clRetainContext() on the parameter's cl_context.
|
||||
*/
|
||||
Context(const Context& context) : detail::Wrapper<cl_type>(context) {}
|
||||
|
||||
/*! \brief Constructor from cl_context - takes ownership.
|
||||
*
|
||||
*
|
||||
* This effectively transfers ownership of a refcount on the cl_context
|
||||
* into the new Context object.
|
||||
*/
|
||||
__CL_EXPLICIT_CONSTRUCTORS Context(const cl_context& context) : detail::Wrapper<cl_type>(context) {}
|
||||
|
||||
/*! \brief Assignment operator from Context.
|
||||
*
|
||||
*
|
||||
* This calls clRetainContext() on the parameter and clReleaseContext() on
|
||||
* the previous value held by this instance.
|
||||
*/
|
||||
@@ -2721,7 +2720,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Assignment operator from cl_context - takes ownership.
|
||||
*
|
||||
*
|
||||
* This effectively transfers ownership of a refcount on the rhs and calls
|
||||
* clReleaseContext() on the value previously held by this instance.
|
||||
*/
|
||||
@@ -2756,7 +2755,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Gets a list of supported image formats.
|
||||
*
|
||||
*
|
||||
* Wraps clGetSupportedImageFormats().
|
||||
*/
|
||||
cl_int getSupportedImageFormats(
|
||||
@@ -2855,13 +2854,13 @@ public:
|
||||
Event() : detail::Wrapper<cl_type>() {}
|
||||
|
||||
/*! \brief Copy constructor.
|
||||
*
|
||||
*
|
||||
* This calls clRetainEvent() on the parameter's cl_event.
|
||||
*/
|
||||
Event(const Event& event) : detail::Wrapper<cl_type>(event) {}
|
||||
|
||||
/*! \brief Constructor from cl_event - takes ownership.
|
||||
*
|
||||
*
|
||||
* This effectively transfers ownership of a refcount on the cl_event
|
||||
* into the new Event object.
|
||||
*/
|
||||
@@ -2882,7 +2881,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Assignment operator from cl_event.
|
||||
*
|
||||
*
|
||||
* This calls clRetainEvent() on the parameter and clReleaseEvent() on
|
||||
* the previous value held by this instance.
|
||||
*/
|
||||
@@ -2941,7 +2940,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Blocks the calling thread until this event completes.
|
||||
*
|
||||
*
|
||||
* Wraps clWaitForEvents().
|
||||
*/
|
||||
cl_int wait() const
|
||||
@@ -2972,7 +2971,7 @@ public:
|
||||
#endif
|
||||
|
||||
/*! \brief Blocks the calling thread until every event specified is complete.
|
||||
*
|
||||
*
|
||||
* Wraps clWaitForEvents().
|
||||
*/
|
||||
static cl_int
|
||||
@@ -2987,7 +2986,7 @@ public:
|
||||
|
||||
#if defined(CL_VERSION_1_1)
|
||||
/*! \brief Class interface for user events (a subset of cl_event's).
|
||||
*
|
||||
*
|
||||
* See Event for details about copy semantics, etc.
|
||||
*/
|
||||
class UserEvent : public Event
|
||||
@@ -3043,7 +3042,7 @@ public:
|
||||
#endif
|
||||
|
||||
/*! \brief Blocks the calling thread until every event specified is complete.
|
||||
*
|
||||
*
|
||||
* Wraps clWaitForEvents().
|
||||
*/
|
||||
inline static cl_int
|
||||
@@ -3076,20 +3075,20 @@ public:
|
||||
Memory() : detail::Wrapper<cl_type>() {}
|
||||
|
||||
/*! \brief Copy constructor - performs shallow copy.
|
||||
*
|
||||
*
|
||||
* This calls clRetainMemObject() on the parameter's cl_mem.
|
||||
*/
|
||||
Memory(const Memory& memory) : detail::Wrapper<cl_type>(memory) {}
|
||||
|
||||
/*! \brief Constructor from cl_mem - takes ownership.
|
||||
*
|
||||
*
|
||||
* This effectively transfers ownership of a refcount on the cl_mem
|
||||
* into the new Memory object.
|
||||
*/
|
||||
__CL_EXPLICIT_CONSTRUCTORS Memory(const cl_mem& memory) : detail::Wrapper<cl_type>(memory) {}
|
||||
|
||||
/*! \brief Assignment operator from Memory.
|
||||
*
|
||||
*
|
||||
* This calls clRetainMemObject() on the parameter and clReleaseMemObject()
|
||||
* on the previous value held by this instance.
|
||||
*/
|
||||
@@ -3173,7 +3172,7 @@ template <typename IteratorType>
|
||||
cl_int copy(const cl::Buffer& buffer, IteratorType startIterator, IteratorType endIterator);
|
||||
|
||||
/*! \brief Class interface for Buffer Memory Objects.
|
||||
*
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
* \see Memory
|
||||
@@ -3365,7 +3364,7 @@ public:
|
||||
/*! \brief Class interface for creating OpenCL buffers from ID3D10Buffer's.
|
||||
*
|
||||
* This is provided to facilitate interoperability with Direct3D.
|
||||
*
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
* \see Memory
|
||||
@@ -3463,9 +3462,9 @@ public:
|
||||
/*! \brief Class interface for GL Buffer Memory Objects.
|
||||
*
|
||||
* This is provided to facilitate interoperability with OpenGL.
|
||||
*
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
*
|
||||
* \see Memory
|
||||
*/
|
||||
class BufferGL : public Buffer
|
||||
@@ -3548,9 +3547,9 @@ public:
|
||||
/*! \brief Class interface for GL Render Buffer Memory Objects.
|
||||
*
|
||||
* This is provided to facilitate interoperability with OpenGL.
|
||||
*
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
*
|
||||
* \see Memory
|
||||
*/
|
||||
class BufferRenderGL : public Buffer
|
||||
@@ -3633,7 +3632,7 @@ public:
|
||||
/*! \brief C++ base class for Image Memory objects.
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
*
|
||||
* \see Memory
|
||||
*/
|
||||
class Image : public Memory
|
||||
@@ -3707,7 +3706,7 @@ public:
|
||||
/*! \brief Class interface for 1D Image Memory objects.
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
*
|
||||
* \see Memory
|
||||
*/
|
||||
class Image1D : public Image
|
||||
@@ -3913,7 +3912,7 @@ public:
|
||||
/*! \brief Class interface for 2D Image Memory objects.
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
*
|
||||
* \see Memory
|
||||
*/
|
||||
class Image2D : public Image
|
||||
@@ -4033,9 +4032,9 @@ public:
|
||||
/*! \brief Class interface for GL 2D Image Memory objects.
|
||||
*
|
||||
* This is provided to facilitate interoperability with OpenGL.
|
||||
*
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
*
|
||||
* \see Memory
|
||||
* \note Deprecated for OpenCL 1.2. Please use ImageGL instead.
|
||||
*/
|
||||
@@ -4182,7 +4181,7 @@ public:
|
||||
/*! \brief Class interface for 3D Image Memory objects.
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
*
|
||||
* \see Memory
|
||||
*/
|
||||
class Image3D : public Image
|
||||
@@ -4306,9 +4305,9 @@ public:
|
||||
/*! \brief Class interface for GL 3D Image Memory objects.
|
||||
*
|
||||
* This is provided to facilitate interoperability with OpenGL.
|
||||
*
|
||||
*
|
||||
* See Memory for details about copy semantics, etc.
|
||||
*
|
||||
*
|
||||
* \see Memory
|
||||
*/
|
||||
class Image3DGL : public Image3D
|
||||
@@ -4446,7 +4445,7 @@ public:
|
||||
* to the same underlying cl_sampler as the original. For details, see
|
||||
* clRetainSampler() and clReleaseSampler().
|
||||
*
|
||||
* \see cl_sampler
|
||||
* \see cl_sampler
|
||||
*/
|
||||
class Sampler : public detail::Wrapper<cl_sampler>
|
||||
{
|
||||
@@ -4487,20 +4486,20 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Copy constructor - performs shallow copy.
|
||||
*
|
||||
*
|
||||
* This calls clRetainSampler() on the parameter's cl_sampler.
|
||||
*/
|
||||
Sampler(const Sampler& sampler) : detail::Wrapper<cl_type>(sampler) {}
|
||||
|
||||
/*! \brief Constructor from cl_sampler - takes ownership.
|
||||
*
|
||||
*
|
||||
* This effectively transfers ownership of a refcount on the cl_sampler
|
||||
* into the new Sampler object.
|
||||
*/
|
||||
Sampler(const cl_sampler& sampler) : detail::Wrapper<cl_type>(sampler) {}
|
||||
|
||||
/*! \brief Assignment operator from Sampler.
|
||||
*
|
||||
*
|
||||
* This calls clRetainSampler() on the parameter and clReleaseSampler()
|
||||
* on the previous value held by this instance.
|
||||
*/
|
||||
@@ -4592,7 +4591,7 @@ public:
|
||||
}
|
||||
|
||||
/*! \brief Conversion operator to const ::size_t *.
|
||||
*
|
||||
*
|
||||
* \returns a pointer to the size of the first dimension.
|
||||
*/
|
||||
operator const ::size_t*() const
|
||||
@@ -4680,20 +4679,20 @@ public:
|
||||
Kernel() {}
|
||||
|
||||
/*! \brief Copy constructor - performs shallow copy.
|
||||
*
|
||||
*
|
||||
* This calls clRetainKernel() on the parameter's cl_kernel.
|
||||
*/
|
||||
Kernel(const Kernel& kernel) : detail::Wrapper<cl_type>(kernel) {}
|
||||
|
||||
/*! \brief Constructor from cl_kernel - takes ownership.
|
||||
*
|
||||
*
|
||||
* This effectively transfers ownership of a refcount on the cl_kernel
|
||||
* into the new Kernel object.
|
||||
*/
|
||||
__CL_EXPLICIT_CONSTRUCTORS Kernel(const cl_kernel& kernel) : detail::Wrapper<cl_type>(kernel) {}
|
||||
|
||||
/*! \brief Assignment operator from Kernel.
|
||||
*
|
||||
*
|
||||
* This calls clRetainKernel() on the parameter and clReleaseKernel()
|
||||
* on the previous value held by this instance.
|
||||
*/
|
||||
@@ -4962,7 +4961,7 @@ public:
|
||||
* Set to CL_INVALID_BINARY if the binary provided is not valid for the matching device.
|
||||
* \param err if non-NULL will be set to CL_SUCCESS on successful operation or one of the following errors:
|
||||
* CL_INVALID_CONTEXT if context is not a valid context.
|
||||
* CL_INVALID_VALUE if the length of devices is zero; or if the length of binaries does not match the length of devices;
|
||||
* CL_INVALID_VALUE if the length of devices is zero; or if the length of binaries does not match the length of devices;
|
||||
* or if any entry in binaries is NULL or has length 0.
|
||||
* CL_INVALID_DEVICE if OpenCL devices listed in devices are not in the list of devices associated with context.
|
||||
* CL_INVALID_BINARY if an invalid program binary was encountered for any device. binaryStatus will return specific status for each device.
|
||||
@@ -5688,7 +5687,7 @@ public:
|
||||
/**
|
||||
* Enqueue a command to fill a buffer object with a pattern
|
||||
* of a given size. The pattern is specified a as vector.
|
||||
* \tparam PatternType The datatype of the pattern field.
|
||||
* \tparam PatternType The datatype of the pattern field.
|
||||
* The pattern type must be an accepted OpenCL data type.
|
||||
*/
|
||||
template <typename PatternType>
|
||||
@@ -6033,14 +6032,14 @@ public:
|
||||
|
||||
#if defined(CL_VERSION_1_2)
|
||||
/**
|
||||
* Enqueues a marker command which waits for either a list of events to complete,
|
||||
* Enqueues a marker command which waits for either a list of events to complete,
|
||||
* or all previously enqueued commands to complete.
|
||||
*
|
||||
* Enqueues a marker command which waits for either a list of events to complete,
|
||||
* or if the list is empty it waits for all commands previously enqueued in command_queue
|
||||
* to complete before it completes. This command returns an event which can be waited on,
|
||||
* i.e. this event can be waited on to insure that all events either in the event_wait_list
|
||||
* or all previously enqueued commands, queued before this command to command_queue,
|
||||
* Enqueues a marker command which waits for either a list of events to complete,
|
||||
* or if the list is empty it waits for all commands previously enqueued in command_queue
|
||||
* to complete before it completes. This command returns an event which can be waited on,
|
||||
* i.e. this event can be waited on to insure that all events either in the event_wait_list
|
||||
* or all previously enqueued commands, queued before this command to command_queue,
|
||||
* have completed.
|
||||
*/
|
||||
cl_int enqueueMarkerWithWaitList(
|
||||
@@ -6065,12 +6064,12 @@ public:
|
||||
/**
|
||||
* A synchronization point that enqueues a barrier operation.
|
||||
*
|
||||
* Enqueues a barrier command which waits for either a list of events to complete,
|
||||
* or if the list is empty it waits for all commands previously enqueued in command_queue
|
||||
* to complete before it completes. This command blocks command execution, that is, any
|
||||
* following commands enqueued after it do not execute until it completes. This command
|
||||
* returns an event which can be waited on, i.e. this event can be waited on to insure that
|
||||
* all events either in the event_wait_list or all previously enqueued commands, queued
|
||||
* Enqueues a barrier command which waits for either a list of events to complete,
|
||||
* or if the list is empty it waits for all commands previously enqueued in command_queue
|
||||
* to complete before it completes. This command blocks command execution, that is, any
|
||||
* following commands enqueued after it do not execute until it completes. This command
|
||||
* returns an event which can be waited on, i.e. this event can be waited on to insure that
|
||||
* all events either in the event_wait_list or all previously enqueued commands, queued
|
||||
* before this command to command_queue, have completed.
|
||||
*/
|
||||
cl_int enqueueBarrierWithWaitList(
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include "fft_internal.h"
|
||||
#include "clFFT.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "fft_internal.h"
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
@@ -67,7 +67,7 @@ allocateTemporaryBufferInterleaved(cl_fft_plan *plan, cl_uint batchSize)
|
||||
if (plan->tempmemobj)
|
||||
clReleaseMemObject(plan->tempmemobj);
|
||||
|
||||
plan->tempmemobj = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, NULL, &err);
|
||||
plan->tempmemobj = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, nullptr, &err);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
@@ -88,8 +88,8 @@ allocateTemporaryBufferPlannar(cl_fft_plan *plan, cl_uint batchSize)
|
||||
if (plan->tempmemobj_imag)
|
||||
clReleaseMemObject(plan->tempmemobj_imag);
|
||||
|
||||
plan->tempmemobj_real = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, NULL, &err);
|
||||
plan->tempmemobj_imag = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, NULL, &terr);
|
||||
plan->tempmemobj_real = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, nullptr, &err);
|
||||
plan->tempmemobj_imag = clCreateBuffer(plan->context, CL_MEM_READ_WRITE, tmpLength, nullptr, &terr);
|
||||
err |= terr;
|
||||
}
|
||||
return err;
|
||||
@@ -126,7 +126,7 @@ clFFT_ExecuteInterleaved(cl_command_queue queue, clFFT_Plan Plan, cl_int batchSi
|
||||
cl_int num_events, cl_event *event_list, cl_event *event)
|
||||
{
|
||||
int s;
|
||||
cl_fft_plan *plan = (cl_fft_plan *)Plan;
|
||||
auto *plan = (cl_fft_plan *)Plan;
|
||||
if (plan->format != clFFT_InterleavedComplexFormat)
|
||||
return CL_INVALID_VALUE;
|
||||
|
||||
@@ -180,7 +180,7 @@ clFFT_ExecuteInterleaved(cl_command_queue queue, clFFT_Plan Plan, cl_int batchSi
|
||||
err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_int), &dir);
|
||||
err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_int), &s);
|
||||
|
||||
err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL);
|
||||
err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, nullptr, &gWorkItems, &lWorkItems, 0, nullptr, nullptr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -203,7 +203,7 @@ clFFT_ExecuteInterleaved(cl_command_queue queue, clFFT_Plan Plan, cl_int batchSi
|
||||
err |= clSetKernelArg(kernelInfo->kernel, 2, sizeof(cl_int), &dir);
|
||||
err |= clSetKernelArg(kernelInfo->kernel, 3, sizeof(cl_int), &s);
|
||||
|
||||
err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL);
|
||||
err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, nullptr, &gWorkItems, &lWorkItems, 0, nullptr, nullptr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -223,7 +223,7 @@ clFFT_ExecutePlannar(cl_command_queue queue, clFFT_Plan Plan, cl_int batchSize,
|
||||
cl_int num_events, cl_event *event_list, cl_event *event)
|
||||
{
|
||||
int s;
|
||||
cl_fft_plan *plan = (cl_fft_plan *)Plan;
|
||||
auto *plan = (cl_fft_plan *)Plan;
|
||||
|
||||
if (plan->format != clFFT_SplitComplexFormat)
|
||||
return CL_INVALID_VALUE;
|
||||
@@ -285,7 +285,7 @@ clFFT_ExecutePlannar(cl_command_queue queue, clFFT_Plan Plan, cl_int batchSize,
|
||||
err |= clSetKernelArg(kernelInfo->kernel, 4, sizeof(cl_int), &dir);
|
||||
err |= clSetKernelArg(kernelInfo->kernel, 5, sizeof(cl_int), &s);
|
||||
|
||||
err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL);
|
||||
err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, nullptr, &gWorkItems, &lWorkItems, 0, nullptr, nullptr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -309,7 +309,7 @@ clFFT_ExecutePlannar(cl_command_queue queue, clFFT_Plan Plan, cl_int batchSize,
|
||||
err |= clSetKernelArg(kernelInfo->kernel, 4, sizeof(cl_int), &dir);
|
||||
err |= clSetKernelArg(kernelInfo->kernel, 5, sizeof(cl_int), &s);
|
||||
|
||||
err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, NULL, &gWorkItems, &lWorkItems, 0, NULL, NULL);
|
||||
err |= clEnqueueNDRangeKernel(queue, kernelInfo->kernel, 1, nullptr, &gWorkItems, &lWorkItems, 0, nullptr, nullptr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -327,7 +327,7 @@ cl_int
|
||||
clFFT_1DTwistInterleaved(clFFT_Plan Plan, cl_command_queue queue, cl_mem array,
|
||||
unsigned numRows, unsigned numCols, unsigned startRow, unsigned rowsToProcess, clFFT_Direction dir)
|
||||
{
|
||||
cl_fft_plan *plan = (cl_fft_plan *)Plan;
|
||||
auto *plan = (cl_fft_plan *)Plan;
|
||||
|
||||
unsigned int N = numRows * numCols;
|
||||
unsigned int nCols = numCols;
|
||||
@@ -337,12 +337,12 @@ clFFT_1DTwistInterleaved(clFFT_Plan Plan, cl_command_queue queue, cl_mem array,
|
||||
int err = 0;
|
||||
|
||||
cl_device_id device_id;
|
||||
err = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &device_id, NULL);
|
||||
err = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &device_id, nullptr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
size_t gSize;
|
||||
err = clGetKernelWorkGroupInfo(plan->twist_kernel, device_id, CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &gSize, NULL);
|
||||
err = clGetKernelWorkGroupInfo(plan->twist_kernel, device_id, CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &gSize, nullptr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -357,7 +357,7 @@ clFFT_1DTwistInterleaved(clFFT_Plan Plan, cl_command_queue queue, cl_mem array,
|
||||
err |= clSetKernelArg(plan->twist_kernel, 4, sizeof(unsigned int), &rToProcess);
|
||||
err |= clSetKernelArg(plan->twist_kernel, 5, sizeof(int), &d);
|
||||
|
||||
err |= clEnqueueNDRangeKernel(queue, plan->twist_kernel, 1, NULL, numGlobalThreads, numLocalThreads, 0, NULL, NULL);
|
||||
err |= clEnqueueNDRangeKernel(queue, plan->twist_kernel, 1, nullptr, numGlobalThreads, numLocalThreads, 0, nullptr, nullptr);
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -366,7 +366,7 @@ cl_int
|
||||
clFFT_1DTwistPlannar(clFFT_Plan Plan, cl_command_queue queue, cl_mem array_real, cl_mem array_imag,
|
||||
unsigned numRows, unsigned numCols, unsigned startRow, unsigned rowsToProcess, clFFT_Direction dir)
|
||||
{
|
||||
cl_fft_plan *plan = (cl_fft_plan *)Plan;
|
||||
auto *plan = (cl_fft_plan *)Plan;
|
||||
|
||||
unsigned int N = numRows * numCols;
|
||||
unsigned int nCols = numCols;
|
||||
@@ -376,12 +376,12 @@ clFFT_1DTwistPlannar(clFFT_Plan Plan, cl_command_queue queue, cl_mem array_real,
|
||||
int err = 0;
|
||||
|
||||
cl_device_id device_id;
|
||||
err = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &device_id, NULL);
|
||||
err = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE, sizeof(cl_device_id), &device_id, nullptr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
size_t gSize;
|
||||
err = clGetKernelWorkGroupInfo(plan->twist_kernel, device_id, CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &gSize, NULL);
|
||||
err = clGetKernelWorkGroupInfo(plan->twist_kernel, device_id, CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &gSize, nullptr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -397,7 +397,7 @@ clFFT_1DTwistPlannar(clFFT_Plan Plan, cl_command_queue queue, cl_mem array_real,
|
||||
err |= clSetKernelArg(plan->twist_kernel, 5, sizeof(unsigned int), &rToProcess);
|
||||
err |= clSetKernelArg(plan->twist_kernel, 6, sizeof(int), &d);
|
||||
|
||||
err |= clEnqueueNDRangeKernel(queue, plan->twist_kernel, 1, NULL, numGlobalThreads, numLocalThreads, 0, NULL, NULL);
|
||||
err |= clEnqueueNDRangeKernel(queue, plan->twist_kernel, 1, nullptr, numGlobalThreads, numLocalThreads, 0, nullptr, nullptr);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
#include "clFFT.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -46,16 +46,16 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include "clFFT.h"
|
||||
#include "fft_internal.h"
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "fft_internal.h"
|
||||
#include "clFFT.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -806,13 +806,13 @@ createLocalMemfftKernelString(cl_fft_plan *plan)
|
||||
kernelName = string("fft") + num2str(kCount);
|
||||
|
||||
*kInfo = (cl_fft_kernel_info *)malloc(sizeof(cl_fft_kernel_info));
|
||||
(*kInfo)->kernel = 0;
|
||||
(*kInfo)->kernel = nullptr;
|
||||
(*kInfo)->lmem_size = 0;
|
||||
(*kInfo)->num_workgroups = 0;
|
||||
(*kInfo)->num_workitems_per_workgroup = 0;
|
||||
(*kInfo)->dir = cl_fft_kernel_x;
|
||||
(*kInfo)->in_place_possible = 1;
|
||||
(*kInfo)->next = NULL;
|
||||
(*kInfo)->next = nullptr;
|
||||
(*kInfo)->kernel_name = (char *)malloc(sizeof(char) * (kernelName.size() + 1));
|
||||
strcpy((*kInfo)->kernel_name, kernelName.c_str());
|
||||
|
||||
@@ -1015,7 +1015,7 @@ createGlobalFFTKernelString(cl_fft_plan *plan, int n, int BS, cl_fft_kernel_dir
|
||||
|
||||
kernelName = string("fft") + num2str(kCount);
|
||||
*kInfo = (cl_fft_kernel_info *)malloc(sizeof(cl_fft_kernel_info));
|
||||
(*kInfo)->kernel = 0;
|
||||
(*kInfo)->kernel = nullptr;
|
||||
if (R2 == 1)
|
||||
(*kInfo)->lmem_size = 0;
|
||||
else
|
||||
@@ -1033,7 +1033,7 @@ createGlobalFFTKernelString(cl_fft_plan *plan, int n, int BS, cl_fft_kernel_dir
|
||||
(*kInfo)->in_place_possible = 1;
|
||||
else
|
||||
(*kInfo)->in_place_possible = 0;
|
||||
(*kInfo)->next = NULL;
|
||||
(*kInfo)->next = nullptr;
|
||||
(*kInfo)->kernel_name = (char *)malloc(sizeof(char) * (kernelName.size() + 1));
|
||||
strcpy((*kInfo)->kernel_name, kernelName.c_str());
|
||||
|
||||
|
||||
@@ -46,16 +46,16 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include "fft_internal.h"
|
||||
#include "fft_base_kernels.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "fft_internal.h"
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -128,37 +128,37 @@ destroy_plan(cl_fft_plan *Plan)
|
||||
kernel_info = tmp;
|
||||
}
|
||||
|
||||
Plan->kernel_info = NULL;
|
||||
Plan->kernel_info = nullptr;
|
||||
|
||||
if (Plan->kernel_string)
|
||||
{
|
||||
delete Plan->kernel_string;
|
||||
Plan->kernel_string = NULL;
|
||||
Plan->kernel_string = nullptr;
|
||||
}
|
||||
if (Plan->twist_kernel)
|
||||
{
|
||||
clReleaseKernel(Plan->twist_kernel);
|
||||
Plan->twist_kernel = NULL;
|
||||
Plan->twist_kernel = nullptr;
|
||||
}
|
||||
if (Plan->program)
|
||||
{
|
||||
clReleaseProgram(Plan->program);
|
||||
Plan->program = NULL;
|
||||
Plan->program = nullptr;
|
||||
}
|
||||
if (Plan->tempmemobj)
|
||||
{
|
||||
clReleaseMemObject(Plan->tempmemobj);
|
||||
Plan->tempmemobj = NULL;
|
||||
Plan->tempmemobj = nullptr;
|
||||
}
|
||||
if (Plan->tempmemobj_real)
|
||||
{
|
||||
clReleaseMemObject(Plan->tempmemobj_real);
|
||||
Plan->tempmemobj_real = NULL;
|
||||
Plan->tempmemobj_real = nullptr;
|
||||
}
|
||||
if (Plan->tempmemobj_imag)
|
||||
{
|
||||
clReleaseMemObject(Plan->tempmemobj_imag);
|
||||
Plan->tempmemobj_imag = NULL;
|
||||
Plan->tempmemobj_imag = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ int getMaxKernelWorkGroupSize(cl_fft_plan *plan, unsigned int *max_wg_size, unsi
|
||||
cl_fft_kernel_info *kInfo = plan->kernel_info;
|
||||
while (kInfo)
|
||||
{
|
||||
err = clGetKernelWorkGroupInfo(kInfo->kernel, devices[i], CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &wg_size, NULL);
|
||||
err = clGetKernelWorkGroupInfo(kInfo->kernel, devices[i], CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &wg_size, nullptr);
|
||||
if (err != CL_SUCCESS)
|
||||
return -1;
|
||||
|
||||
@@ -235,7 +235,7 @@ clFFT_CreatePlan(cl_context context, clFFT_Dim3 n, clFFT_Dimension dim, clFFT_Da
|
||||
int i;
|
||||
cl_int err;
|
||||
int isPow2 = 1;
|
||||
cl_fft_plan *plan = NULL;
|
||||
cl_fft_plan *plan = nullptr;
|
||||
ostringstream kString;
|
||||
int num_devices;
|
||||
int gpu_found = 0;
|
||||
@@ -265,15 +265,15 @@ clFFT_CreatePlan(cl_context context, clFFT_Dim3 n, clFFT_Dimension dim, clFFT_Da
|
||||
plan->n = n;
|
||||
plan->dim = dim;
|
||||
plan->format = dataFormat;
|
||||
plan->kernel_info = 0;
|
||||
plan->kernel_info = nullptr;
|
||||
plan->num_kernels = 0;
|
||||
plan->twist_kernel = 0;
|
||||
plan->program = 0;
|
||||
plan->twist_kernel = nullptr;
|
||||
plan->program = nullptr;
|
||||
plan->temp_buffer_needed = 0;
|
||||
plan->last_batch_size = 0;
|
||||
plan->tempmemobj = 0;
|
||||
plan->tempmemobj_real = 0;
|
||||
plan->tempmemobj_imag = 0;
|
||||
plan->tempmemobj = nullptr;
|
||||
plan->tempmemobj_real = nullptr;
|
||||
plan->tempmemobj_imag = nullptr;
|
||||
plan->max_localmem_fft_size = 2048;
|
||||
plan->max_work_item_per_workgroup = 256;
|
||||
plan->max_radix = 16;
|
||||
@@ -289,7 +289,7 @@ patch_kernel_source:
|
||||
getBlockConfigAndKernelString(plan);
|
||||
|
||||
const char *source_str = plan->kernel_string->c_str();
|
||||
plan->program = clCreateProgramWithSource(context, 1, (const char **)&source_str, NULL, &err);
|
||||
plan->program = clCreateProgramWithSource(context, 1, (const char **)&source_str, nullptr, &err);
|
||||
ERR_MACRO(err);
|
||||
|
||||
err = clGetContextInfo(context, CL_CONTEXT_DEVICES, sizeof(devices), devices, &ret_size);
|
||||
@@ -299,28 +299,28 @@ patch_kernel_source:
|
||||
|
||||
for (i = 0; i < num_devices; i++)
|
||||
{
|
||||
err = clGetDeviceInfo(devices[i], CL_DEVICE_TYPE, sizeof(device_type), &device_type, NULL);
|
||||
err = clGetDeviceInfo(devices[i], CL_DEVICE_TYPE, sizeof(device_type), &device_type, nullptr);
|
||||
ERR_MACRO(err);
|
||||
|
||||
if (device_type == CL_DEVICE_TYPE_GPU)
|
||||
{
|
||||
gpu_found = 1;
|
||||
err = clBuildProgram(plan->program, 1, &devices[i], "-cl-mad-enable", NULL, NULL);
|
||||
err = clBuildProgram(plan->program, 1, &devices[i], "-cl-mad-enable", nullptr, nullptr);
|
||||
if (err != CL_SUCCESS)
|
||||
{
|
||||
char *build_log;
|
||||
char devicename[200];
|
||||
size_t log_size;
|
||||
|
||||
err = clGetProgramBuildInfo(plan->program, devices[i], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size);
|
||||
err = clGetProgramBuildInfo(plan->program, devices[i], CL_PROGRAM_BUILD_LOG, 0, nullptr, &log_size);
|
||||
ERR_MACRO(err);
|
||||
|
||||
build_log = (char *)malloc(log_size + 1);
|
||||
|
||||
err = clGetProgramBuildInfo(plan->program, devices[i], CL_PROGRAM_BUILD_LOG, log_size, build_log, NULL);
|
||||
err = clGetProgramBuildInfo(plan->program, devices[i], CL_PROGRAM_BUILD_LOG, log_size, build_log, nullptr);
|
||||
ERR_MACRO(err);
|
||||
|
||||
err = clGetDeviceInfo(devices[i], CL_DEVICE_NAME, sizeof(devicename), devicename, NULL);
|
||||
err = clGetDeviceInfo(devices[i], CL_DEVICE_NAME, sizeof(devicename), devicename, nullptr);
|
||||
ERR_MACRO(err);
|
||||
|
||||
fprintf(stdout, "FFT program build log on device %s\n", devicename);
|
||||
@@ -370,7 +370,7 @@ patch_kernel_source:
|
||||
|
||||
void clFFT_DestroyPlan(clFFT_Plan plan)
|
||||
{
|
||||
cl_fft_plan *Plan = (cl_fft_plan *)plan;
|
||||
auto *Plan = (cl_fft_plan *)plan;
|
||||
if (Plan)
|
||||
{
|
||||
destroy_plan(Plan);
|
||||
@@ -388,7 +388,7 @@ void clFFT_DumpPlan(clFFT_Plan Plan, FILE *file)
|
||||
else
|
||||
out = file;
|
||||
|
||||
cl_fft_plan *plan = (cl_fft_plan *)Plan;
|
||||
auto *plan = (cl_fft_plan *)Plan;
|
||||
cl_fft_kernel_info *kInfo = plan->kernel_info;
|
||||
|
||||
while (kInfo)
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
#define GNSS_SDR_PASS_THROUGH_H_
|
||||
|
||||
#include "conjugate_cc.h"
|
||||
#include "conjugate_sc.h"
|
||||
#include "conjugate_ic.h"
|
||||
#include "conjugate_sc.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/blocks/copy.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
@@ -56,14 +56,14 @@
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "gnss_frequencies.h"
|
||||
#include "gnss_obs_codes.h"
|
||||
#include <pthread.h>
|
||||
#include <netinet/in.h>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstdint>
|
||||
#include <netinet/in.h>
|
||||
#include <pthread.h>
|
||||
|
||||
|
||||
/* macros --------------------------------------------------------------------*/
|
||||
@@ -1211,7 +1211,7 @@ typedef struct
|
||||
char local[1024]; /* local file path */
|
||||
int topts[4]; /* time options {poff,tint,toff,tretry} (s) */
|
||||
gtime_t tnext; /* next retry time (gpst) */
|
||||
pthread_t thread; /* download thread */
|
||||
pthread_t thread; /* download thread */
|
||||
} ftp_t;
|
||||
|
||||
|
||||
@@ -1284,7 +1284,7 @@ typedef struct
|
||||
stream_t stream[8]; /* streams {rov,base,corr,sol1,sol2,logr,logb,logc} */
|
||||
stream_t *moni; /* monitor stream */
|
||||
unsigned int tick; /* start tick */
|
||||
pthread_t thread; /* server thread */
|
||||
pthread_t thread; /* server thread */
|
||||
int cputime; /* CPU time (ms) for a processing cycle */
|
||||
int prcout; /* missing observation data count */
|
||||
lock_t lock; /* lock flag */
|
||||
|
||||
@@ -31,15 +31,15 @@
|
||||
#ifndef GNSS_SDR_RTKLIB_CONVERSIONS_H_
|
||||
#define GNSS_SDR_RTKLIB_CONVERSIONS_H_
|
||||
|
||||
#include "rtklib.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "galileo_almanac.h"
|
||||
#include "galileo_ephemeris.h"
|
||||
#include "gps_ephemeris.h"
|
||||
#include "gps_cnav_ephemeris.h"
|
||||
#include "glonass_gnav_ephemeris.h"
|
||||
#include "glonass_gnav_utc_model.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_almanac.h"
|
||||
#include "galileo_almanac.h"
|
||||
#include "gps_cnav_ephemeris.h"
|
||||
#include "gps_ephemeris.h"
|
||||
#include "rtklib.h"
|
||||
|
||||
eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph);
|
||||
eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph);
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "rtklib_ephemeris.h"
|
||||
#include "rtklib_preceph.h"
|
||||
#include "rtklib_rtkcmn.h"
|
||||
#include "rtklib_sbas.h"
|
||||
#include "rtklib_preceph.h"
|
||||
|
||||
/* constants ------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ void gauss(int n, double *L, double *Z, int i, int j)
|
||||
{
|
||||
int k, mu;
|
||||
|
||||
if ((mu = static_cast<int>ROUND_LAMBDA(L[i + j * n])) != 0)
|
||||
if ((mu = static_cast<int> ROUND_LAMBDA(L[i + j * n])) != 0)
|
||||
{
|
||||
for (k = i; k < n; k++) L[k + n * j] -= static_cast<double>(mu) * L[k + i * n];
|
||||
for (k = 0; k < n; k++) Z[k + n * j] -= static_cast<double>(mu) * Z[k + i * n];
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "rtklib_ppp.h"
|
||||
#include "rtklib_rtkcmn.h"
|
||||
#include "rtklib_sbas.h"
|
||||
#include "rtklib_ephemeris.h"
|
||||
#include "rtklib_ionex.h"
|
||||
#include "rtklib_tides.h"
|
||||
#include "rtklib_lambda.h"
|
||||
#include "rtklib_rtkcmn.h"
|
||||
#include "rtklib_sbas.h"
|
||||
#include "rtklib_tides.h"
|
||||
|
||||
/* wave length of LC (m) -----------------------------------------------------*/
|
||||
double lam_LC(int i, int j, int k)
|
||||
|
||||
@@ -146,7 +146,7 @@ int addpeph(nav_t *nav, peph_t *peph)
|
||||
|
||||
|
||||
/* read sp3 body -------------------------------------------------------------*/
|
||||
void readsp3b(FILE *fp, char type, int *sats __attribute__((unused)), int ns, double *bfact,
|
||||
void readsp3b(FILE *fp, char type, int *sats __attribute__((unused)), int ns, const double *bfact,
|
||||
char *tsys, int index, int opt, nav_t *nav)
|
||||
{
|
||||
peph_t peph;
|
||||
|
||||
@@ -75,7 +75,7 @@ int code2sys(char code);
|
||||
int readsp3h(FILE *fp, gtime_t *time, char *type, int *sats,
|
||||
double *bfact, char *tsys);
|
||||
int addpeph(nav_t *nav, peph_t *peph);
|
||||
void readsp3b(FILE *fp, char type, int *sats, int ns, double *bfact,
|
||||
void readsp3b(FILE *fp, char type, int *sats, int ns, const double *bfact,
|
||||
char *tsys, int index, int opt, nav_t *nav);
|
||||
int cmppeph(const void *p1, const void *p2);
|
||||
void combpeph(nav_t *nav, int opt);
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
//#include <cstdio>
|
||||
#include <dirent.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <sys/time.h>
|
||||
#include <string>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
@@ -1471,7 +1471,9 @@ gtime_t timeget(void)
|
||||
{
|
||||
gtime_t time;
|
||||
double ep[6] = {};
|
||||
struct timeval tv{};
|
||||
struct timeval tv
|
||||
{
|
||||
};
|
||||
struct tm *tt;
|
||||
|
||||
if (!gettimeofday(&tv, nullptr) && (tt = gmtime(&tv.tv_sec)))
|
||||
|
||||
@@ -52,11 +52,11 @@
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "rtklib_rtkpos.h"
|
||||
#include "rtklib_pntpos.h"
|
||||
#include "rtklib_ephemeris.h"
|
||||
#include "rtklib_lambda.h"
|
||||
#include "rtklib_pntpos.h"
|
||||
#include "rtklib_ppp.h"
|
||||
#include "rtklib_tides.h"
|
||||
#include "rtklib_lambda.h"
|
||||
|
||||
static int resamb_WLNL(rtk_t *rtk __attribute((unused)), const obsd_t *obs __attribute((unused)), const int *sat __attribute((unused)),
|
||||
const int *iu __attribute((unused)), const int *ir __attribute((unused)), int ns __attribute__((unused)), const nav_t *nav __attribute((unused)),
|
||||
@@ -541,7 +541,7 @@ void initx_rtk(rtk_t *rtk, double xi, double var, int i)
|
||||
|
||||
|
||||
/* select common satellites between rover and reference station --------------*/
|
||||
int selsat(const obsd_t *obs, double *azel, int nu, int nr,
|
||||
int selsat(const obsd_t *obs, const double *azel, int nu, int nr,
|
||||
const prcopt_t *opt, int *sat, int *iu, int *ir)
|
||||
{
|
||||
int i, j, k = 0;
|
||||
@@ -1155,7 +1155,7 @@ int zdres(int base, const obsd_t *obs, int n, const double *rs,
|
||||
|
||||
|
||||
/* test valid observation data -----------------------------------------------*/
|
||||
int validobs(int i, int j, int f, int nf, double *y)
|
||||
int validobs(int i, int j, int f, int nf, const double *y)
|
||||
{
|
||||
/* if no phase observable, psudorange is also unusable */
|
||||
return y[f + i * nf * 2] != 0.0 && y[f + j * nf * 2] != 0.0 &&
|
||||
@@ -1302,7 +1302,7 @@ int test_sys(int sys, int m)
|
||||
|
||||
/* double-differenced phase/code residuals -----------------------------------*/
|
||||
int ddres(rtk_t *rtk, const nav_t *nav, double dt, const double *x,
|
||||
const double *P, const int *sat, double *y, double *e,
|
||||
const double *P, const int *sat, double *y, const double *e,
|
||||
double *azel, const int *iu, const int *ir, int ns, double *v,
|
||||
double *H, double *R, int *vflg)
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ double baseline(const double *ru, const double *rb, double *dr);
|
||||
|
||||
void initx_rtk(rtk_t *rtk, double xi, double var, int i);
|
||||
|
||||
int selsat(const obsd_t *obs, double *azel, int nu, int nr,
|
||||
int selsat(const obsd_t *obs, const double *azel, int nu, int nr,
|
||||
const prcopt_t *opt, int *sat, int *iu, int *ir);
|
||||
|
||||
void udpos(rtk_t *rtk, double tt);
|
||||
@@ -144,7 +144,7 @@ int zdres(int base, const obsd_t *obs, int n, const double *rs,
|
||||
const double *rr, const prcopt_t *opt, int index, double *y,
|
||||
double *e, double *azel);
|
||||
|
||||
int validobs(int i, int j, int f, int nf, double *y);
|
||||
int validobs(int i, int j, int f, int nf, const double *y);
|
||||
|
||||
void ddcov(const int *nb, int n, const double *Ri, const double *Rj,
|
||||
int nv, double *R);
|
||||
@@ -162,7 +162,7 @@ double gloicbcorr(int sat1, int sat2, const prcopt_t *opt, double lam1,
|
||||
int test_sys(int sys, int m);
|
||||
|
||||
int ddres(rtk_t *rtk, const nav_t *nav, double dt, const double *x,
|
||||
const double *P, const int *sat, double *y, double *e,
|
||||
const double *P, const int *sat, double *y, const double *e,
|
||||
double *azel, const int *iu, const int *ir, int ns, double *v,
|
||||
double *H, double *R, int *vflg);
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
#include "rtklib_rtksvr.h"
|
||||
#include "rtklib_preceph.h"
|
||||
#include "rtklib_rtcm.h"
|
||||
#include "rtklib_rtkcmn.h"
|
||||
#include "rtklib_rtkpos.h"
|
||||
#include "rtklib_solution.h"
|
||||
#include "rtklib_sbas.h"
|
||||
#include "rtklib_preceph.h"
|
||||
#include "rtklib_solution.h"
|
||||
#include "rtklib_stream.h"
|
||||
#include "rtklib_rtcm.h"
|
||||
|
||||
/* write solution header to output stream ------------------------------------*/
|
||||
void writesolhead(stream_t *stream, const solopt_t *solopt)
|
||||
@@ -424,7 +424,7 @@ void decodefile(rtksvr_t *svr, int index)
|
||||
{ /* precise clock */
|
||||
|
||||
/* read rinex clock */ // Disabled!!
|
||||
if (1 /*readrnxc(file, &nav)<=0 */)
|
||||
if (true /*readrnxc(file, &nav)<=0 */)
|
||||
{
|
||||
tracet(1, "rinex clock file read error: %s\n", file);
|
||||
return;
|
||||
@@ -730,7 +730,7 @@ void rtksvrunlock(rtksvr_t *svr) { rtk_unlock(&svr->lock); }
|
||||
* return : status (1:ok 0:error)
|
||||
*-----------------------------------------------------------------------------*/
|
||||
int rtksvrstart(rtksvr_t *svr, int cycle, int buffsize, int *strs,
|
||||
char **paths, int *formats, int navsel, char **cmds,
|
||||
char **paths, const int *formats, int navsel, char **cmds,
|
||||
char **rcvopts, int nmeacycle, int nmeareq,
|
||||
const double *nmeapos, prcopt_t *prcopt,
|
||||
solopt_t *solopt, stream_t *moni)
|
||||
|
||||
@@ -116,7 +116,7 @@ void rtksvrlock(rtksvr_t *svr);
|
||||
void rtksvrunlock(rtksvr_t *svr);
|
||||
|
||||
int rtksvrstart(rtksvr_t *svr, int cycle, int buffsize, int *strs,
|
||||
char **paths, int *formats, int navsel, char **cmds,
|
||||
char **paths, const int *formats, int navsel, char **cmds,
|
||||
char **rcvopts, int nmeacycle, int nmeareq,
|
||||
const double *nmeapos, prcopt_t *prcopt,
|
||||
solopt_t *solopt, stream_t *moni);
|
||||
|
||||
@@ -51,10 +51,10 @@
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <cctype>
|
||||
#include "rtklib_solution.h"
|
||||
#include "rtklib_rtkcmn.h"
|
||||
#include "rtklib_rtksvr.h"
|
||||
#include <cctype>
|
||||
|
||||
|
||||
/* constants and macros ------------------------------------------------------*/
|
||||
@@ -1111,7 +1111,7 @@ void addsolstat(solstatbuf_t *statbuf, const solstat_t *stat)
|
||||
{
|
||||
statbuf->nmax = statbuf->nmax == 0 ? 8192 : statbuf->nmax * 2;
|
||||
if (!(statbuf_data = static_cast<solstat_t *>(realloc(statbuf->data, sizeof(solstat_t) *
|
||||
statbuf->nmax))))
|
||||
statbuf->nmax))))
|
||||
{
|
||||
trace(1, "addsolstat: memory allocation error\n");
|
||||
free(statbuf->data);
|
||||
|
||||
@@ -50,21 +50,21 @@
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <rtklib_stream.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <rtklib_rtkcmn.h>
|
||||
#include <rtklib_solution.h>
|
||||
#include <cctype>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <rtklib_stream.h>
|
||||
#include <string>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <cerrno>
|
||||
#include <termios.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
/* global options ------------------------------------------------------------*/
|
||||
|
||||
@@ -16,22 +16,22 @@
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "volk_gnsssdr_profile.h"
|
||||
#include "kernel_tests.h" // for init_test_list
|
||||
#include "qa_utils.h" // for volk_gnsssdr_test_results_t
|
||||
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
|
||||
#include "volk_gnsssdr/volk_gnsssdr_prefs.h" // for volk_gnsssdr_get_config_path
|
||||
#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t
|
||||
#include "volk_gnsssdr_profile.h"
|
||||
#include "volk_gnsssdr/volk_gnsssdr_prefs.h" // for volk_gnsssdr_get_config_path
|
||||
#include <boost/filesystem/operations.hpp> // for create_directories, exists
|
||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <sys/stat.h> // for stat
|
||||
#include <cstddef> // for size_t
|
||||
#include <iostream> // for operator<<, basic_ostream
|
||||
#include <fstream> // IWYU pragma: keep
|
||||
#include <map> // for map, map<>::iterator
|
||||
#include <utility> // for pair
|
||||
#include <vector> // for vector, vector<>::const_..
|
||||
#include <boost/filesystem/operations.hpp> // for create_directories, exists
|
||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <cstddef> // for size_t
|
||||
#include <fstream> // IWYU pragma: keep
|
||||
#include <iostream> // for operator<<, basic_ostream
|
||||
#include <map> // for map, map<>::iterator
|
||||
#include <sys/stat.h> // for stat
|
||||
#include <utility> // for pair
|
||||
#include <vector> // for vector, vector<>::const_..
|
||||
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#define INCLUDED_volk_gnsssdr_16i_resamplerxnpuppet_16i_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_16i_xn_resampler_16i_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -63,12 +63,12 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_16i_xn_resampler_16i_xn_H
|
||||
#define INCLUDED_volk_gnsssdr_16i_xn_resampler_16i_xn_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
#define INCLUDED_volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_H
|
||||
|
||||
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <math.h>
|
||||
//#include <stdio.h>
|
||||
|
||||
@@ -742,9 +742,9 @@ static inline void volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_u_sse3(lv_16sc
|
||||
|
||||
|
||||
#ifdef LV_HAVE_AVX2
|
||||
#include <immintrin.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_sse3_intrinsics.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_avx_intrinsics.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_sse3_intrinsics.h>
|
||||
#include <immintrin.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_a_avx2(lv_16sc_t* result, const lv_16sc_t* in_common, const lv_32fc_t phase_inc, lv_32fc_t* phase, const int16_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
{
|
||||
@@ -896,9 +896,9 @@ static inline void volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_a_avx2(lv_16sc
|
||||
#endif /* LV_HAVE_AVX2 */
|
||||
|
||||
#ifdef LV_HAVE_AVX2
|
||||
#include <immintrin.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_sse3_intrinsics.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_avx_intrinsics.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_sse3_intrinsics.h>
|
||||
#include <immintrin.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn_u_avx2(lv_16sc_t* result, const lv_16sc_t* in_common, const lv_32fc_t phase_inc, lv_32fc_t* phase, const int16_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
{
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#define INCLUDED_volk_gnsssdr_16ic_16i_rotator_dotprodxnpuppet_16ic_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_16ic_resampler_fast_16ic_H
|
||||
#define INCLUDED_volk_gnsssdr_16ic_resampler_fast_16ic_H
|
||||
|
||||
#include <math.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#define INCLUDED_volk_gnsssdr_16ic_resamplerfastxnpuppet_16ic_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_16ic_xn_resampler_fast_16ic_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#define INCLUDED_volk_gnsssdr_16ic_resamplerxnpuppet_16ic_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_16ic_xn_resampler_16ic_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#define INCLUDED_volk_gnsssdr_16ic_rotatorpuppet_16ic_H
|
||||
|
||||
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include "volk_gnsssdr/volk_gnsssdr_16ic_s32fc_x2_rotator_16ic.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
@@ -59,9 +59,9 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_16ic_x2_dot_prod_16ic_H
|
||||
#define INCLUDED_volk_gnsssdr_16ic_x2_dot_prod_16ic_H
|
||||
|
||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -61,10 +61,10 @@
|
||||
#define INCLUDED_volk_gnsssdr_16ic_xn_dot_prod_16ic_xn_H
|
||||
|
||||
|
||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#define INCLUDED_volk_gnsssdr_16ic_x2_dotprodxnpuppet_16ic_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_16ic_x2_dot_prod_16ic_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
#define INCLUDED_volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_H
|
||||
|
||||
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
@@ -1490,8 +1490,8 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_neon(lv_16sc_t*
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_neon_intrinsics.h>
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_neon_vma(lv_16sc_t* result, const lv_16sc_t* in_common, const lv_32fc_t phase_inc, lv_32fc_t* phase, const lv_16sc_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
{
|
||||
@@ -1687,8 +1687,8 @@ static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_neon_vma(lv_16s
|
||||
|
||||
|
||||
#ifdef LV_HAVE_NEONV7
|
||||
#include <arm_neon.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_neon_intrinsics.h>
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn_neon_optvma(lv_16sc_t* result, const lv_16sc_t* in_common, const lv_32fc_t phase_inc, lv_32fc_t* phase, const lv_16sc_t** in_a, int num_a_vectors, unsigned int num_points)
|
||||
{
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#define INCLUDED_volk_gnsssdr_16ic_x2_rotator_dotprodxnpuppet_16ic_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -63,10 +63,10 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_16ic_xn_resampler_16ic_xn_H
|
||||
#define INCLUDED_volk_gnsssdr_16ic_xn_resampler_16ic_xn_H
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -63,9 +63,9 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_16ic_xn_resampler_fast_16ic_xn_H
|
||||
#define INCLUDED_volk_gnsssdr_16ic_xn_resampler_fast_16ic_xn_H
|
||||
|
||||
#include <math.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
#define INCLUDED_volk_gnsssdr_32f_high_dynamics_resamplerxnpuppet_32f_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_32f_xn_high_dynamics_resampler_32f_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#define INCLUDED_volk_gnsssdr_32f_resamplerxnpuppet_32f_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_32f_xn_resampler_32f_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
@@ -57,9 +57,9 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_32f_sincos_32fc_H
|
||||
#define INCLUDED_volk_gnsssdr_32f_sincos_32fc_H
|
||||
|
||||
#include <math.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef LV_HAVE_SSE4_1
|
||||
#include <smmintrin.h>
|
||||
|
||||
@@ -67,13 +67,13 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_32f_xn_high_dynamics_resampler_32f_xn_H
|
||||
#define INCLUDED_volk_gnsssdr_32f_xn_high_dynamics_resampler_32f_xn_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h> /* abs */
|
||||
#include <stdint.h> /* int64_t */
|
||||
#include <stdio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h> /* int64_t */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* abs */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -63,13 +63,13 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_32f_xn_resampler_32f_xn_H
|
||||
#define INCLUDED_volk_gnsssdr_32f_xn_resampler_32f_xn_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h> /* abs */
|
||||
#include <stdint.h> /* int64_t */
|
||||
#include <stdio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h> /* int64_t */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* abs */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -70,10 +70,10 @@
|
||||
#define INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_H
|
||||
|
||||
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#define INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
#define INCLUDED_volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_H
|
||||
|
||||
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <math.h>
|
||||
//#include <stdio.h>
|
||||
|
||||
@@ -165,8 +165,8 @@ static inline void volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_generic_reload
|
||||
#endif /*LV_HAVE_GENERIC*/
|
||||
|
||||
#ifdef LV_HAVE_AVX
|
||||
#include <immintrin.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_avx_intrinsics.h>
|
||||
#include <immintrin.h>
|
||||
static inline void volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_u_avx(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, lv_32fc_t* phase, const float** in_a, int num_a_vectors, unsigned int num_points)
|
||||
{
|
||||
unsigned int number = 0;
|
||||
@@ -329,8 +329,8 @@ static inline void volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_u_avx(lv_32fc_
|
||||
|
||||
|
||||
#ifdef LV_HAVE_AVX
|
||||
#include <immintrin.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_avx_intrinsics.h>
|
||||
#include <immintrin.h>
|
||||
static inline void volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_a_avx(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, lv_32fc_t* phase, const float** in_a, int num_a_vectors, unsigned int num_points)
|
||||
{
|
||||
unsigned int number = 0;
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#define INCLUDED_volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_32fc_convert_16ic_H
|
||||
#define INCLUDED_volk_gnsssdr_32fc_convert_16ic_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_complex.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include "volk_gnsssdr/volk_gnsssdr_complex.h"
|
||||
|
||||
#ifdef LV_HAVE_SSE2
|
||||
#include <emmintrin.h>
|
||||
|
||||
@@ -56,10 +56,10 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_32fc_convert_8ic_H
|
||||
#define INCLUDED_volk_gnsssdr_32fc_convert_8ic_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
#include "volk_gnsssdr/volk_gnsssdr_complex.h"
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#define INCLUDED_volk_gnsssdr_32fc_resamplerxnpuppet_32fc_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_32fc_xn_resampler_32fc_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
#define INCLUDED_volk_gnsssdr_32fc_x2_rotator_dot_prod_32fc_xn_H
|
||||
|
||||
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#define INCLUDED_volk_gnsssdr_32fc_x2_rotator_dotprodxnpuppet_32fc_H
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_32fc_x2_rotator_dot_prod_32fc_xn.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -63,10 +63,10 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_32fc_xn_resampler_32fc_xn_H
|
||||
#define INCLUDED_volk_gnsssdr_32fc_xn_resampler_32fc_xn_H
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h> /* abs */
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h> /* abs */
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
@@ -59,9 +59,9 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_8ic_x2_dot_prod_8ic_H
|
||||
#define INCLUDED_volk_gnsssdr_8ic_x2_dot_prod_8ic_H
|
||||
|
||||
#include <string.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
|
||||
|
||||
@@ -62,9 +62,9 @@
|
||||
#ifndef INCLUDED_volk_gnsssdr_s32f_sincos_32fc_H
|
||||
#define INCLUDED_volk_gnsssdr_s32f_sincos_32fc_H
|
||||
|
||||
#include <math.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
#ifdef LV_HAVE_SSE2
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
#define INCLUDED_volk_gnsssdr_s32f_sincospuppet_32fc_H
|
||||
|
||||
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include "volk_gnsssdr/volk_gnsssdr_s32f_sincos_32fc.h"
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
|
||||
#include "qa_utils.h"
|
||||
#include <vector>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
// macros for initializing volk_gnsssdr_test_case_t. Macros are needed to generate
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t
|
||||
#include "qa_utils.h"
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h> // for volk_gnsssdr_free, volk_gnsssdr_malloc
|
||||
#include <cassert> // for assert
|
||||
#include <chrono> // for system_clock, duration,...
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
#define _DARWIN_C_SOURCE
|
||||
#endif
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
|
||||
#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t
|
||||
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
|
||||
#include <cstdbool> // for bool, false
|
||||
#include <cstdlib> // for NULL
|
||||
#include <map> // for map
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "qa_utils.h" // for volk_gnsssdr_test_case_t, volk_gnsssdr_test_results_t
|
||||
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
|
||||
#include <cstdbool> // for bool, false, true
|
||||
#include <iostream> // for operator<<, basic_ostream, endl, char...
|
||||
#include <fstream> // IWYU pragma: keep
|
||||
#include <iostream> // for operator<<, basic_ostream, endl, char...
|
||||
#include <map> // for map, map<>::iterator, _Rb_tree_iterator
|
||||
#include <sstream> // for stringstream
|
||||
#include <string> // for string, operator<<
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#ifndef GNSS_SDR_VOLK_GNSSSDR_RANK_ARCHS_H
|
||||
#define GNSS_SDR_VOLK_GNSSSDR_RANK_ARCHS_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
||||
@@ -19,14 +19,13 @@
|
||||
#ifndef INCLUDED_VOLK_GNSSSDR_RUNTIME
|
||||
#define INCLUDED_VOLK_GNSSSDR_RUNTIME
|
||||
|
||||
#include <volk_gnsssdr/volk_gnsssdr_typedefs.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_config_fixed.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_common.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_config_fixed.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_typedefs.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
__VOLK_DECL_BEGIN
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#ifndef INCLUDED_VOLK_GNSSSDR_TYPEDEFS
|
||||
#define INCLUDED_VOLK_GNSSSDR_TYPEDEFS
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
// clang-format off
|
||||
%for kern in kernels:
|
||||
|
||||
Reference in New Issue
Block a user