C++ Reference

struct vortex::engine::engine_config_t::acquire_config

Public Members

bool preload
bool master
process_graph_t graph
struct vortex::engine::detail::engine_plan_t::acquire_plan

Public Members

processor_sets rotation
size_t output_index
struct vortex::engine::adapter::acquisition : public vortex::engine::adapter<block_t>::detail::base

Public Types

using callback_t = std::function<void(size_t, std::exception_ptr)>

Public Members

std::function< std::optional< cuda::device_t >)> device
std::function<spectra_stream_factory_t()> stream_factory
std::function<shape_t()> output_shape
std::function<size_t()> channels_per_sample
std::function<void()> prepare
std::function<void()> start
std::function<void()> stop
std::function<void(block_t&, spectra_stream_t&, callback_t&&)> next_async
struct vortex::marker::active_lines : public vortex::marker::detail::base

Public Functions

auto operator<=>(const active_lines&) const = default
template<typename block_t>
struct vortex::engine::adapter

Public Types

using spectra_stream_t = typename block_t::spectra_stream_t
using ascan_stream_t = typename block_t::ascan_stream_t
using io_stream_ts = decltype(std::declval<block_t>().streams())
using spectra_stream_factory_t = std::function<spectra_stream_t()>
using ascan_stream_factory_t = std::function<ascan_stream_t()>
using shape_t = std::array<size_t, 3>
template<typename T>
class vortex::sync::aggregator_t

Public Functions

inline aggregator_t(size_t n)
inline void push(size_t index, T o, size_t limit = 0, bool drop = true)
inline bool pop(std::vector<T> &os, bool wait = true)
inline void clear()
inline void finish()

Protected Functions

inline bool _empty()

Protected Attributes

std::atomic_bool _finished = false
std::condition_variable _push_cv
std::condition_variable _pop_cv
std::mutex _mutex
std::vector<std::queue<T>> _queues
template<typename config_t>
class vortex::acquire::alazar_acquisition_t : public vortex::acquire::detail::alazar_acquisition_t<config_t, alazar::board_t>

Subclassed by vortex::acquire::alazar_fft_acquisition_t< config_t >

Public Types

using base_t = detail::alazar_acquisition_t<config_t, alazar::board_t>
using callback_t = typename base_t::callback_t

Public Functions

template<typename V>
inline size_t next(const cpu_viewable<V> &buffer)
template<typename V>
inline size_t next(size_t id, const cpu_viewable<V> &buffer)
template<typename V>
inline void next_async(const cpu_viewable<V> &buffer, callback_t &&callback)
template<typename V>
inline void next_async(size_t id, const cpu_viewable<V> &buffer, callback_t &&callback)
template<typename config_t_, typename board_t_>
class vortex::acquire::detail::alazar_acquisition_t

Public Types

using config_t = config_t_
using board_t = board_t_
using output_element_t = uint16_t
using callback_t = std::function<void(size_t, std::exception_ptr)>

Public Functions

inline alazar_acquisition_t(std::shared_ptr<spdlog::logger> log = nullptr)
inline virtual ~alazar_acquisition_t()
inline const config_t &config() const
inline const board_t &board() const
inline virtual void initialize(config_t config)
inline virtual void prepare()
inline void start()
inline void stop()
inline bool running() const

Protected Types

using job_t = std::function<void()>

Protected Functions

template<typename V>
inline size_t _next(size_t id, const viewable<V> &buffer_)
template<typename V>
inline void _next_async(size_t id, const viewable<V> &buffer_, callback_t &&callback)
template<typename V>
inline auto _post_block(size_t id, const V &buffer, bool lock_is_held)
template<typename V>
inline auto _wait_block(size_t id, const V &buffer, bool lock_is_held)
inline void _stop(bool lock_is_held)
inline void _worker_loop()

Protected Attributes

std::shared_ptr<spdlog::logger> _log
std::atomic_bool _abort = false
sync::queue_t<job_t> _jobs
std::thread _worker
board_t _board
std::mutex _mutex
config_t _config
template<typename clock_t, typename trigger_t, typename option_t>
struct vortex::acquire::alazar_config_t : public vortex::acquire::detail::alazar_config_t<clock_t, trigger_t, option_t>

Subclassed by vortex::acquire::alazar_fft_config_t< clock_t, trigger_t, option_t >

Public Types

using base_t = detail::alazar_config_t<clock_t, trigger_t, option_t>

Public Functions

inline auto create_board()
inline virtual void validate()
inline virtual void apply(alazar::board_t &board, std::shared_ptr<spdlog::logger> &log)
template<typename clock_t_, typename trigger_t_, typename option_t_>
struct vortex::acquire::detail::alazar_config_t : public vortex::acquire::dso_config_t

Public Types

using clock_t = clock_t_
using trigger_t = trigger_t_
using option_t = option_t_

Public Functions

template<typename board_t>
inline void validate(const board_t &board)
template<typename board_t>
inline void apply(board_t &board, std::shared_ptr<spdlog::logger> &log)
inline size_t recommended_minimum_records_per_block() const
inline virtual size_t buffer_bytes_per_record() const
inline auto bytes_per_multisample() const
inline auto channel_mask() const
inline virtual size_t channels_per_sample() const override
inline bool samples_per_second_is_known() const
inline auto &samples_per_second()
inline const auto &samples_per_second() const

Public Members

struct vortex::acquire::detail::alazar_config_t::device_t device
clock_t clock = {clock::internal_t{}}
trigger_t trigger = {trigger::single_external_t{}}
std::vector<input_t> inputs
std::vector<option_t> options
std::vector<size_t> resampling
std::chrono::milliseconds acquire_timeout = std::chrono::seconds(1)
bool stop_on_error = true
template<typename T>
class vortex::alazar::alazar_device_tensor_t : public vortex::detail::tensor_impl_t<T>

Public Types

using element_t = T

Public Functions

inline alazar_device_tensor_t()
inline alazar_device_tensor_t(HANDLE handle, cuda::device_t device)
inline ~alazar_device_tensor_t()
inline alazar_device_tensor_t(alazar_device_tensor_t &&o)
inline alazar_device_tensor_t &operator=(alazar_device_tensor_t &&o)
inline const auto &handle() const
inline const auto &device() const
inline virtual size_t underlying_count() const override

Protected Functions

inline virtual void _allocate(size_t count) override
inline void _release()
inline void _reset()

Protected Attributes

size_t _count
cuda::device_t _device
HANDLE _handle
template<typename config_t>
class vortex::acquire::alazar_fft_acquisition_t : public vortex::acquire::alazar_acquisition_t<config_t>

Public Types

using base_t = alazar_acquisition_t<config_t>
using callback_t = typename base_t::callback_t
using base_t = detail::alazar_acquisition_t<config_t, alazar::board_t>

Public Functions

inline virtual void prepare() override
template<typename clock_t, typename trigger_t, typename option_t>
struct vortex::acquire::alazar_fft_config_t : public vortex::acquire::alazar_config_t<clock_t, trigger_t, option_t>

Public Types

using base_t = alazar_config_t<clock_t, trigger_t, option_t>

Public Functions

inline virtual std::array<size_t, 3> shape() const override
inline virtual size_t buffer_bytes_per_record() const override
inline size_t samples_per_ascan() const
inline size_t &ascans_per_block()
inline const size_t &ascans_per_block() const
inline virtual void validate() override
inline virtual void apply(alazar::board_t &board, std::shared_ptr<spdlog::logger> &log) override

Public Members

size_t fft_length = 1024
xt::xtensor<std::complex<float>, 1> spectral_filter
bool include_time_domain = false
xt::xtensor<int16_t, 1> background

Protected Functions

inline auto _fft_record_length() const
template<typename config_t>
class vortex::acquire::alazar_gpu_acquisition_t : public vortex::acquire::detail::alazar_acquisition_t<config_t, alazar::gpu_board_t>

Public Types

using base_t = detail::alazar_acquisition_t<config_t, alazar::gpu_board_t>
using callback_t = typename base_t::callback_t

Public Functions

template<typename V>
inline size_t next(const alazar::alazar_viewable<V> &buffer)
template<typename V>
inline size_t next(size_t id, const alazar::alazar_viewable<V> &buffer)
template<typename V>
inline void next_async(const alazar::alazar_viewable<V> &buffer, callback_t &&callback)
template<typename V>
inline void next_async(size_t id, const alazar::alazar_viewable<V> &buffer, callback_t &&callback)
template<typename clock_t, typename trigger_t, typename option_t>
struct vortex::acquire::alazar_gpu_config_t : public vortex::acquire::detail::alazar_config_t<clock_t, trigger_t, option_t>

Public Types

using base_t = detail::alazar_config_t<clock_t, trigger_t, option_t>

Public Functions

inline auto create_board()
inline virtual void validate()

Public Members

size_t gpu_device_index = 0
template<typename T>
class vortex::alazar::detail::alazar_view_t : public vortex::alazar::alazar_viewable<alazar_view_t<T>>, public vortex::detail::dynamic_view_t<T, fixed_alazar_view_t<T>, alazar_view_t<T>>

Public Types

using base_t = vortex::detail::dynamic_view_t<T, fixed_alazar_view_t<T>, alazar_view_t<T>>

Public Functions

inline alazar_view_t()
template<typename S1>
inline alazar_view_t(T *data, const S1 &shape, const cuda::device_t &device, const HANDLE &handle)
template<typename O, typename S1>
inline alazar_view_t(const O &other, T *data, const S1 &shape)
template<typename V>
inline alazar_view_t(const alazar_viewable<V> &other)
inline const auto &device() const
inline const auto &handle() const
inline bool is_accessible() const
inline bool is_accessible(cuda::device_t device2) const

Protected Attributes

cuda::device_t _device
HANDLE _handle
template<typename derived_t>
class alazar_viewable : public vortex::cuda::cuda_viewable<derived_t>
struct vortex::alazar::detail::alignment_info_t

Public Members

U32 min_record_size
U32 pretrigger_alignment
U32 resolution
struct analog_input_t : public vortex::io::detail::analog_t

Subclassed by vortex::io::channel::analog_voltage_input_t

struct analog_output_t : public vortex::io::detail::analog_t

Subclassed by vortex::io::channel::analog_voltage_output_t

struct vortex::io::detail::analog_t : public vortex::io::detail::base_t

Subclassed by vortex::io::detail::analog_input_t, vortex::io::detail::analog_output_t

Public Functions

inline bool operator==(const analog_t &o) const

Public Members

std::string port_name
double logical_units_per_physical_unit = 1
range_t<float64> limits = {{-10, 10}}
struct vortex::io::channel::analog_voltage_input_t : public vortex::io::detail::analog_input_t

Public Functions

inline void apply(daqmx::daqmx_t &daqmx, std::shared_ptr<spdlog::logger> &log) const
inline bool operator==(const analog_voltage_input_t &o) const

Public Members

daqmx::terminal_t terminal = daqmx::terminal_t::referenced
struct vortex::io::channel::analog_voltage_output_t : public vortex::io::detail::analog_output_t

Public Functions

inline void apply(daqmx::daqmx_t &daqmx, std::shared_ptr<spdlog::logger> &log) const
struct vortex::scan::warp::angular_t

Public Functions

inline angular_t()
inline angular_t(double factor_)
template<typename E1, typename E2>
inline auto forward(xt::xexpression<E1> &in, xt::xexpression<E2> &out) const
template<typename E1, typename E2>
inline auto inverse(xt::xexpression<E1> &in, xt::xexpression<E2> &out) const
template<typename E>
inline void forward(xt::xexpression<E> &inout) const
template<typename E>
inline void inverse(xt::xexpression<E> &inout) const

Public Members

double factor = 2
template<typename T>
struct array
template<>
struct vortex::storage::detail::matlab::array<double>

Public Static Attributes

static constexpr static auto value   = mxDOUBLE_CLASS
static constexpr static auto name   = "float64"
static constexpr static auto flags   = 0
template<>
struct vortex::storage::detail::matlab::array<float>

Public Static Attributes

static constexpr static auto value   = mxSINGLE_CLASS
static constexpr static auto name   = "float32"
static constexpr static auto flags   = 0
template<>
struct vortex::storage::detail::matlab::array<int16_t>

Public Static Attributes

static constexpr static auto value   = mxINT16_CLASS
static constexpr static auto name   = "int16"
static constexpr static auto flags   = 0
template<>
struct vortex::storage::detail::matlab::array<int32_t>

Public Static Attributes

static constexpr static auto value   = mxINT32_CLASS
static constexpr static auto name   = "int32"
static constexpr static auto flags   = 0
template<>
struct vortex::storage::detail::matlab::array<int64_t>

Public Static Attributes

static constexpr static auto value   = mxINT64_CLASS
static constexpr static auto name   = "int64"
static constexpr static auto flags   = 0
template<>
struct vortex::storage::detail::matlab::array<int8_t>

Public Static Attributes

static constexpr static auto value   = mxINT8_CLASS
static constexpr static auto name   = "int8"
static constexpr static auto flags   = 0
template<typename T>
struct vortex::storage::detail::matlab::array<std::complex<T>>

Public Static Attributes

static constexpr static auto value   = array<T>::value
static constexpr static auto flags   = complex_flag
template<>
struct vortex::storage::detail::matlab::array<uint16_t>

Public Static Attributes

static constexpr static auto value   = mxUINT16_CLASS
static constexpr static auto name   = "uint16"
static constexpr static auto flags   = 0
template<>
struct vortex::storage::detail::matlab::array<uint32_t>

Public Static Attributes

static constexpr static auto value   = mxUINT32_CLASS
static constexpr static auto name   = "uint32"
static constexpr static auto flags   = 0
template<>
struct vortex::storage::detail::matlab::array<uint64_t>

Public Static Attributes

static constexpr static auto value   = mxUINT64_CLASS
static constexpr static auto name   = "uint64"
static constexpr static auto flags   = 0
template<>
struct vortex::storage::detail::matlab::array<uint8_t>

Public Static Attributes

static constexpr static auto value   = mxUINT8_CLASS
static constexpr static auto name   = "uint8"
static constexpr static auto flags   = 0
struct vortex::engine::detail::engine_plan_t::ascan_buffer

Public Members

ascan_stream_factory_t factory
std::optional<cuda::device_t> device
shape_t shape
template<typename element_t>
struct ascan_stack_storage : public vortex::endpoint::detail::stack_storage<stack_format_executor_t, simple_stack_t<element_t>, detail::select_ascans_t>
template<typename element_t>
struct ascan_stream_storage : public vortex::endpoint::detail::stream_storage<simple_stream_t<element_t>, detail::select_ascans_t>
struct vortex::acquire::option::auxio_clock_out_t

Public Functions

template<typename board_t>
inline void apply(board_t &board, std::shared_ptr<spdlog::logger> &log) const
inline bool operator==(const auxio_clock_out_t &o) const
struct vortex::acquire::option::auxio_pacer_out_t

Public Functions

template<typename board_t>
inline void apply(board_t &board, std::shared_ptr<spdlog::logger> &log) const
inline bool operator==(const auxio_pacer_out_t &o) const

Public Members

U32 divider = 2
struct vortex::acquire::option::auxio_trigger_out_t

Public Functions

template<typename board_t>
inline void apply(board_t &board, std::shared_ptr<spdlog::logger> &log) const
inline bool operator==(const auxio_trigger_out_t &o) const
struct balance_t
struct vortex::engine::adapter::detail::base

Subclassed by vortex::engine::adapter< block_t >::acquisition, vortex::engine::adapter< block_t >::endpoint, vortex::engine::adapter< block_t >::formatter, vortex::engine::adapter< block_t >::io, vortex::engine::adapter< block_t >::processor

Public Functions

template<typename T>
inline base(const T *target)
inline bool operator==(const base &o) const
inline bool operator<(const base &o) const

Private Members

const void *_target
struct vortex::marker::detail::base

Subclassed by vortex::marker::active_lines, vortex::marker::event, vortex::marker::inactive_lines, vortex::marker::scan_boundary, vortex::marker::segment_boundary, vortex::marker::volume_boundary

Public Types

using flags_t = marker::flags_t<>

Public Functions

inline base()
inline base(counter_t sample_)
auto operator<=>(const base &o) const = default

Public Members

counter_t sample
struct base_t
struct vortex::io::detail::base_t

Subclassed by vortex::io::detail::analog_t, vortex::io::detail::digital_t

Public Functions

inline bool operator==(const base_t &o) const

Public Members

size_t stream = 0
size_t channel = 0
template<typename T, typename shape_t, typename stride_t>
class vortex::detail::base_view_t

Public Types

using element_t = std::decay_t<T>

Public Functions

inline auto valid() const
inline auto data() const
template<typename List>
inline auto data(const List &idxs) const
inline auto data(const std::initializer_list<size_t> &idxs) const
template<typename Iterator>
inline auto data(const Iterator &begin, const Iterator &end) const
template<typename List>
inline auto offset(const List &idxs) const
inline auto offset(const std::initializer_list<size_t> &idxs) const
template<typename Iterator>
inline auto offset(const Iterator &begin, const Iterator &end) const
inline auto count() const
inline auto size_in_bytes() const
inline const auto &shape() const
inline auto shape(size_t idx) const
inline const auto &stride() const
inline auto stride(size_t idx) const
inline auto stride_in_bytes(size_t idx) const
inline auto stride_in_bytes() const
inline auto shape_and_stride() const
inline auto dimension() const

Protected Functions

inline base_view_t(T *data)
inline void _default_stride()

Protected Attributes

T *_data
shape_t _shape
stride_t _stride
template<typename acquire_element_t_, typename process_element_t_, typename analog_element_t_, typename digital_element_t_>
struct vortex::engine::block_t

Public Types

enum stream_index_t

Values:

enumerator galvo_target
enumerator sample_target
enumerator galvo_actual
enumerator sample_actual
enumerator strobes
using acquire_element_t = acquire_element_t_
using process_element_t = process_element_t_
using analog_element_t = analog_element_t_
using digital_element_t = digital_element_t_
using id_t = size_t
using marker_t = default_marker_t
using spectra_stream_t = std::variant<sync::lockable<cuda::cuda_device_tensor_t<acquire_element_t>>, sync::lockable<cuda::cuda_host_tensor_t<acquire_element_t>>>
using ascan_stream_t = std::variant<sync::lockable<cuda::cuda_device_tensor_t<process_element_t>>, sync::lockable<cuda::cuda_host_tensor_t<process_element_t>>>
using scan_stream_t = sync::lockable<cuda::cuda_host_tensor_t<analog_element_t>>
using strobe_stream_t = sync::lockable<cpu_tensor_t<digital_element_t>>

Public Functions

inline auto streams(size_t lead_samples = 0)
inline auto streams(size_t lead_samples = 0) const

Public Members

size_t id
time_t timestamp
counter_t sample
size_t length
std::vector<marker_t> markers
std::vector<spectra_stream_t> spectra
std::vector<ascan_stream_t> ascans
std::unordered_map<size_t, scan_stream_t> galvo_target
scan_stream_t sample_target
scan_stream_t galvo_actual
scan_stream_t sample_actual
std::unordered_map<size_t, strobe_stream_t> strobes
class vortex::alazar::board_t

Public Functions

board_t()
board_t(U32 system_index, U32 board_index)
~board_t()
const info_t &info() const
const HANDLE &handle() const
void configure_clock_external(float level_ratio = 0.5f, coupling_t coupling = coupling_t::AC, clock_edge_t clock_edge = clock_edge_t::rising, U32 decimation = 0)
void configure_clock_internal(size_t samples_per_second, U32 decimation = 0)
void configure_single_trigger_external(size_t range_millivolts = trigger_range_TTL, float level_ratio = 0.0f, size_t delay_samples = 0, trigger_slope_t slope = trigger_slope_t::positive, coupling_t coupling = coupling_t::DC)
void configure_dual_trigger_external(size_t range_millivolts = trigger_range_TTL, float level_ratio_first = 0.0f, float level_ratio_second = 0.0f, size_t delay_samples = 0, trigger_slope_t slope_first = trigger_slope_t::positive, coupling_t coupling = coupling_t::DC)
void configure_input(channel_t channel, coupling_t coupling = coupling_t::DC, size_t range_millivolts = 400, size_t impedance_ohms = 50)
void configure_auxio_trigger_out()
void configure_auxio_clock_out()
void configure_auxio_pacer_out(U32 divider = 2)
void configure_fft_window(U32 samples_per_record, const std::complex<float> *window)
void configure_fft_window(U32 samples_per_record, float *real = nullptr, float *imaginary = nullptr)
void configure_fft_background_subtraction(U32 samples_per_record = 0, const S16 *background_record = nullptr)
void configure_sample_skipping(U32 clocks_per_record = 0, U16 *sample_bitmap = nullptr)
void configure_capture(channel_t channels, U32 samples_per_record, U32 records_per_buffer, U32 records_per_acquisition = infinite_acquisition, long transfer_offset = 0)
void configure_capture_fft(channel_t channels, U32 samples_per_record, U32 records_per_buffer, U32 fft_length, U32 output_format, long transfer_offset = 0)
void start_capture()
void stop_capture()
void post_buffer(void *ptr, size_t size_in_bytes)
void wait_buffer(void *ptr)
void wait_buffer(void *ptr, const std::chrono::milliseconds &timeout)
void set_dual_edge_sampling(U8 channel_mask, bool enable)
void set_ignore_bad_clock(bool enable, double good_seconds = 0.0, double bad_seconds = 0.0)
double buffer_bytes_per_sample() const
size_t samples_per_record() const
size_t record_capture_count() const
size_t pending_buffer_count() const
bool valid() const
bool running() const

Protected Functions

U32 _capture_flags() const
void _configure_external_trigger(size_t range_millivolts, size_t delay_samples, coupling_t coupling)
RETURN_CODE _dsp_aware_abort_capture()
RETURN_CODE _dsp_aware_wait_buffer(void *buffer, U32 timeout_ms)

Protected Attributes

bool _started = false
bool _dsp_active = false
HANDLE _handle = NULL
info_t _info = {0}
template<typename config_t>
class vortex::format::broct_format_executor_t : public vortex::format::stack_format_executor_t<config_t>

Public Types

using base_t = stack_format_executor_t<config_t>

Public Functions

template<typename V1, typename V2>
inline void execute(const cpu_viewable<V1> &volume_buffer_, const cpu_viewable<V2> &block_buffer_, const action::copy &action) const
struct broct_storage : public vortex::endpoint::detail::stack_storage<broct_format_executor_t, broct_storage_t, detail::select_ascans_t, detail::broct_volume_shape_t>
struct vortex::storage::broct_storage_config_t

Public Functions

inline size_t &samples_per_ascan()
inline const size_t &samples_per_ascan() const
inline size_t &ascans_per_bscan()
inline const size_t &ascans_per_bscan() const
inline size_t &bscans_per_volume()
inline const size_t &bscans_per_volume() const
inline auto broct_volume_shape() const
inline auto broct_bscan_shape() const

Public Members

std::string path
std::array<size_t, 3> shape = {{0, 0, 0}}
std::array<double, 3> dimensions = {{1.0, 1.0, 1.0}}
broct_scan_t scan_type = broct_scan_t::rectangular
std::string notes
bool buffering = false
template<typename config_t_>
class vortex::storage::broct_storage_t

Public Types

using config_t = config_t_
using element_t = int8_t

Public Functions

inline broct_storage_t(std::shared_ptr<spdlog::logger> log = nullptr)
inline virtual ~broct_storage_t()
inline const auto &config() const
inline virtual void open(config_t config)
inline virtual void seek(size_t volume_index, size_t bscan_index)
template<typename V>
inline void write_bscan(size_t index, const cpu_viewable<V> &bscan_)
template<typename V>
inline void write_multi_bscan(size_t index, const cpu_viewable<V> &chunk_)
template<typename V>
inline void write_partial_bscan(size_t bscan_index, size_t ascan_index, const cpu_viewable<V> &chunk_)
template<typename V>
inline void write_volume(const cpu_viewable<V> &volume_)
inline virtual void advance_volume(bool allocate = true)
inline virtual void close()
inline virtual bool ready() const

Protected Functions

inline size_t _volume_size_in_bytes()
inline size_t _bscan_size_in_bytes()

Protected Attributes

std::shared_ptr<spdlog::logger> _log
config_t _config
std::ofstream _out
size_t _header_position
size_t _volume_position
size_t _farthest_write_position
struct vortex::endpoint::detail::broct_volume_shape_t

Public Static Functions

template<typename config_t>
static inline auto shape(const config_t &config)
class buffer_not_ready : public vortex::alazar::exception
class buffer_overflow : public vortex::alazar::exception
class buffer_overflow : public vortex::daqmx::exception
class buffer_underflow : public vortex::daqmx::exception
template<typename ...Ts>
struct vortex::io::channel_t : public std::variant<Ts...>

Public Types

using base_t = std::variant<Ts...>

Public Functions

inline auto apply(daqmx::daqmx_t &daqmx, std::shared_ptr<spdlog::logger> &log) const
inline bool operator==(const channel_t &o) const
template<typename ...Ts>
struct vortex::acquire::clock_t : public std::variant<Ts...>

Public Functions

template<typename board_t>
inline auto apply(board_t &board, std::shared_ptr<spdlog::logger> &log) const
inline auto samples_per_second() const
template<typename ...Args>
class vortex::util::completion_worker_pool_t

Public Types

using setup_task_t = std::function<void(size_t)>
using work_t = std::function<std::tuple<Args...>()>
using callback_t = std::function<void(Args...)>

Public Functions

inline completion_worker_pool_t()
inline completion_worker_pool_t(const std::string &prefix, size_t n = 0, setup_task_t &&setup_task = {}, std::shared_ptr<spdlog::logger> log = nullptr)
inline ~completion_worker_pool_t()
inline void post(work_t &&work, callback_t &&callback)
inline void wait_finish()

Protected Attributes

worker_pool_t _work_pool
worker_pool_t _done_pool
struct vortex::format::action::copy

Public Functions

auto operator<=>(const copy&) const = default

Public Members

size_t count
size_t block_offset
size_t buffer_segment
size_t buffer_record
bool reverse
struct vortex::process::copy_processor_config_t

Public Functions

inline std::array<size_t, 3> input_shape() const
inline size_t &records_per_block()
inline const size_t &records_per_block() const
inline size_t &samples_per_record()
inline const size_t &samples_per_record() const
inline size_t channels_per_sample() const
inline std::array<size_t, 3> output_shape() const
inline size_t &ascans_per_block()
inline const size_t &ascans_per_block() const
inline size_t samples_per_ascan() const
inline virtual void validate() const

Public Members

copy::slice_t sample_slice
copy::transform_t sample_transform
size_t slots = 2
size_t channel = 0

Protected Attributes

size_t _ascans_per_block = 1000
size_t _samples_per_record = 1000
template<typename input_element_t_, typename output_element_t_, typename config_t_>
class vortex::process::copy_processor_t

Public Types

using base_t = processor_t<config_t_>
using config_t = config_t_
using input_element_t = input_element_t_
using output_element_t = output_element_t_
using callback_t = std::function<void(std::exception_ptr)>

Public Functions

inline copy_processor_t(std::shared_ptr<spdlog::logger> log = nullptr)
inline virtual ~copy_processor_t()
inline virtual void initialize(config_t config)
inline virtual void change(config_t new_config)
inline const auto &config() const
template<typename V1, typename V2>
inline void next(const cpu_viewable<V1> &input_buffer, const cpu_viewable<V2> &output_buffer)
template<typename V1, typename V2>
inline void next(size_t id, const cpu_viewable<V1> &input_buffer, const cpu_viewable<V2> &output_buffer)
template<typename V1, typename V2>
inline void next_async(const cpu_viewable<V1> &input_buffer, const cpu_viewable<V2> &output_buffer, callback_t &&callback)
template<typename V1, typename V2>
inline void next_async(size_t id, const cpu_viewable<V1> &input_buffer_, const cpu_viewable<V2> &output_buffer_, callback_t &&callback)

Protected Types

using job_t = std::function<void()>

Protected Functions

template<typename V1, typename V2>
inline auto _process(size_t id, const cpu_viewable<V1> &input_buffer_, const cpu_viewable<V2> &output_buffer_)

Protected Attributes

config_t _config
std::shared_ptr<spdlog::logger> _log
std::optional<util::completion_worker_pool_t<std::exception_ptr>> _pool
std::mutex _mutex
class vortex::sync::counter_t

Public Functions

counter_t(size_t initial = 0)
void set(size_t value)
void operator++(int)
void operator--(int)
void increment()
bool decrement()
size_t query() const
bool wait(size_t value = 0) const
void finish()

Protected Attributes

std::atomic_bool _finished = false
std::atomic<size_t> _count = 0
mutable std::mutex _mutex
mutable std::condition_variable _cv
template<typename config_t_, typename input_assignment_t_, typename output_assignment_t_>
class vortex::process::cpu_processor_t : private vortex::process::processor_t<config_t_>

Public Types

using config_t = config_t_
using input_assignment_t = input_assignment_t_
using output_assignment_t = output_assignment_t_
using input_element_t = typename input_assignment_t::element_t
using output_element_t = typename output_assignment_t::element_t
using block_t = typename input_assignment_t::block_t
using callback_t = std::function<void(block_t*)>

Public Functions

inline virtual ~cpu_processor_t()
inline virtual void initialize(config_t config)
inline virtual void change(config_t &new_config)
inline virtual void next(block_t &block)
inline virtual void next_async(block_t *block)
inline virtual void next_async(block_t *block, sync::event_t *event)
inline virtual void next_async(block_t *block, callback_t &&callback)

Protected Functions

inline void _recalculate()
inline void _shutdown_workers()
inline virtual void _process_block(slot_t &slot, block_t &block, bool append_history)
inline void _worker_loop()

Protected Attributes

sync::queue_t<job_t> _jobs
std::thread _worker
sync::event_t _worker_ready
std::mutex _slot_mutex
slot_t _slot
xt::xtensor<output_element_t, 1> _resample_before_weight
xt::xtensor<output_element_t, 1> _resample_after_weight
xt::xtensor<ptrdiff_t, 1> _resample_before_index
xt::xtensor<ptrdiff_t, 1> _resample_after_index
std::mutex _average_ascan_mutex
xt::xtensor<output_element_t, 2> _average_ascan
size_t _average_ascan_index
size_t _average_ascan_count
fft::fftw_plan_t<output_element_t> _ifft
std::shared_mutex _config_mutex
template<typename tensor_t, typename executor_t>
struct vortex::endpoint::detail::cpu_tensor : public vortex::endpoint::detail::notify

Public Types

using base_t = detail::notify

Public Functions

inline cpu_tensor(std::shared_ptr<executor_t> executor, std::vector<size_t> shape, std::shared_ptr<spdlog::logger> log = nullptr)
template<size_t N>
inline cpu_tensor(std::shared_ptr<executor_t> executor, const std::array<size_t, N> &shape, std::shared_ptr<spdlog::logger> log = nullptr)
inline cpu_tensor(std::shared_ptr<executor_t> executor, std::shared_ptr<sync::lockable<tensor_t>> tensor, std::shared_ptr<spdlog::logger> log = nullptr)
inline const auto &tensor() const
inline const auto &executor() const
inline void allocate(const std::optional<cuda::device_t> spectra, const std::optional<cuda::device_t> &ascans)
template<typename block_t, typename V1, typename V2>
inline void handle(const format::format_plan_t &plan, const block_t &block, const viewable<V1> &spectra, const cuda::cuda_viewable<V2> &ascans)
template<typename block_t, typename V1, typename V2>
inline void handle(const format::format_plan_t &plan, const block_t &block, const viewable<V1> &spectra, const cpu_viewable<V2> &ascans_)

Public Members

aggregate_segment_callback_t aggregate_segment_callback
update_callback_t update_callback

Protected Functions

template<typename Callback, typename ...Args>
inline void _notify(std::shared_ptr<spdlog::logger> log, const Callback &callback, Args&&... args)
inline void _default(std::shared_ptr<spdlog::logger> log, std::vector<size_t> &segments, const format::format_action_t &action)

Protected Attributes

std::shared_ptr<executor_t> _executor
std::optional<std::vector<size_t>> _shape
std::shared_ptr<sync::lockable<tensor_t>> _tensor
std::shared_ptr<spdlog::logger> _log

Private Functions

inline void _check()
template<typename T>
class vortex::cpu_tensor_t : public vortex::detail::tensor_impl_t<T>

Public Types

using element_t = T

Public Functions

inline cpu_tensor_t()
inline ~cpu_tensor_t()
inline cpu_tensor_t(cpu_tensor_t &&o)
inline cpu_tensor_t &operator=(cpu_tensor_t &&o)
inline virtual size_t underlying_count() const override

Protected Functions

inline virtual void _allocate(size_t count) override

Protected Attributes

std::vector<T> _buffer
template<typename T>
class vortex::detail::cpu_view_t : public vortex::cpu_viewable<cpu_view_t<T>>, public vortex::detail::dynamic_view_t<T, fixed_cpu_view_t<T>, cpu_view_t<T>>

Public Types

using base_t = detail::dynamic_view_t<T, fixed_cpu_view_t<T>, cpu_view_t<T>>

Public Functions

template<typename O, typename S1>
inline cpu_view_t(const O &other, T *data, const S1 &shape)
template<typename V>
inline cpu_view_t(const cpu_viewable<V> &other)
inline auto to_xt()
inline auto to_xt() const
template<typename derived_t>
struct cpu_viewable : public vortex::viewable<derived_t>
template<typename T>
struct cuda_complex_t
template<>
struct vortex::cuda::detail::cuda_complex_t<double>

Public Types

using type = cuDoubleComplex
template<>
struct vortex::cuda::detail::cuda_complex_t<float>

Public Types

using type = cuFloatComplex
template<typename T, typename executor_t, typename derived_t>
struct vortex::endpoint::detail::cuda_device_tensor_impl : public vortex::endpoint::detail::cuda_tensor_impl<executor_t, cuda::cuda_device_tensor_t<T>, derived_t>

Subclassed by vortex::endpoint::detail::cuda_device_tensor_with_galvo_impl< T, position_format_executor_t, position_cuda_device_tensor< T > >, vortex::endpoint::detail::cuda_device_tensor_with_galvo_impl< T, spiral_format_executor_t, spiral_galvo_cuda_device_tensor< T > >, vortex::endpoint::detail::cuda_device_tensor_with_galvo_impl< T, executor_t, derived_t >

Public Types

using base_t = cuda_tensor_impl<executor_t, cuda::cuda_device_tensor_t<T>, derived_t>

Public Functions

inline void allocate(const std::optional<cuda::device_t> spectra, const std::optional<cuda::device_t> &ascans)
template<typename block_t, typename V1, typename V2>
inline void handle(const format::format_plan_t &plan, const block_t &block, const viewable<V1> &spectra, const cpu_viewable<V2> &ascans)
template<typename block_t, typename V1, typename V2>
inline void handle(const format::format_plan_t &plan, const block_t &block, const viewable<V1> &spectra, const cuda::cuda_viewable<V2> &ascans_)
template<typename T>
class vortex::cuda::cuda_device_tensor_t : public vortex::detail::tensor_impl_t<T>

Public Types

using element_t = T

Public Functions

inline cuda_device_tensor_t()
inline ~cuda_device_tensor_t()
inline cuda_device_tensor_t(cuda_device_tensor_t &&o)
inline cuda_device_tensor_t &operator=(cuda_device_tensor_t &&o)
inline bool is_accessible() const
inline bool is_accessible(device_t device2) const
inline const auto &device() const
inline virtual size_t underlying_count() const override

Protected Functions

inline virtual void _allocate(size_t count) override
inline void _release()
inline void _reset()

Protected Attributes

size_t _count
device_t _device
template<typename T, typename executor_t, typename derived_t>
struct vortex::endpoint::detail::cuda_device_tensor_with_galvo_impl : public vortex::endpoint::detail::cuda_device_tensor_impl<T, executor_t, derived_t>

Public Types

using base_t = cuda_device_tensor_impl<T, executor_t, derived_t>

Public Functions

template<typename block_t, typename V1, typename V2>
inline void handle(const format::format_plan_t &plan, const block_t &block, const viewable<V1> &spectra, const cpu_viewable<V2> &ascans)
template<typename block_t, typename V1, typename V2>
inline void handle(const format::format_plan_t &plan, const block_t &block, const viewable<V1> &spectra, const cuda::cuda_viewable<V2> &ascans_)

Protected Attributes

cuda::cuda_device_tensor_t<double> _sample_target
cuda::cuda_device_tensor_t<double> _sample_actual
template<typename T, typename executor_t, typename derived_t>
struct vortex::endpoint::detail::cuda_host_tensor_impl : public vortex::endpoint::detail::cuda_tensor_impl<executor_t, cuda::cuda_host_tensor_t<T>, derived_t>

Public Types

using base_t = cuda_tensor_impl<executor_t, cuda::cuda_host_tensor_t<T>, derived_t>

Public Functions

inline void allocate(const std::optional<cuda::device_t> spectra, const std::optional<cuda::device_t> &ascans)
template<typename block_t, typename spectra_stream_t, typename ascan_stream_t>
inline void handle(const format::format_plan_t &plan, const block_t &block, const spectra_stream_t &spectra, const ascan_stream_t &ascans)

Protected Functions

inline void _transfer(std::vector<size_t> segments)

Protected Attributes

cuda::cuda_device_tensor_t<T> _device_buffer
template<typename T>
class vortex::cuda::cuda_host_tensor_t : public vortex::detail::tensor_impl_t<T>

Subclassed by vortex::sync::lockable< cuda::cuda_host_tensor_t< analog_element_t > >

Public Types

using element_t = T

Public Functions

inline cuda_host_tensor_t()
inline ~cuda_host_tensor_t()
inline cuda_host_tensor_t(cuda_host_tensor_t &&o)
inline cuda_host_tensor_t &operator=(cuda_host_tensor_t &&o)
inline virtual size_t underlying_count() const override

Protected Functions

inline virtual void _allocate(size_t count) override
inline void _release()
inline void _reset()

Protected Attributes

size_t _count
template<typename T>
struct vortex::process::cuda_processor_config_t : public vortex::process::processor_config_t<T>

Public Types

using element_t = T

Public Functions

inline virtual void validate() override

Public Members

int device = 0
size_t slots = 2
template<typename input_element_t_, typename output_element_t_, typename float_element_t_, typename index_element_t_, typename config_t_>
class vortex::process::cuda_processor_t : public vortex::process::processor_t<config_t_>

Public Types

using base_t = processor_t<config_t_>
using config_t = config_t_
using input_element_t = input_element_t_
using output_element_t = output_element_t_
using float_element_t = float_element_t_
using index_element_t = index_element_t_
using callback_t = std::function<void(std::exception_ptr)>

Public Functions

inline cuda_processor_t(std::shared_ptr<spdlog::logger> log = nullptr)
inline virtual ~cuda_processor_t()
inline virtual void initialize(config_t config)
inline virtual void change(config_t new_config)
template<typename V1, typename V2>
inline void next(const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, bool append_history = true)
template<typename V1, typename V2>
inline void next(size_t id, const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, bool append_history = true)
template<typename V1, typename V2>
inline void next_async(const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, callback_t &&callback)
template<typename V1, typename V2>
inline void next_async(size_t id, const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, callback_t &&callback)
template<typename V1, typename V2>
inline void next_async(const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, bool append_history, callback_t &&callback)
template<typename V1, typename V2>
inline void next_async(size_t id, const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, bool append_history, callback_t &&callback)
template<typename V1, typename V2>
inline void next_async(const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, const cuda::event_t *start_event, const cuda::event_t *done_event, callback_t &&callback)
template<typename V1, typename V2>
inline void next_async(size_t id, const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, const cuda::event_t *start_event, const cuda::event_t *done_event, callback_t &&callback)
template<typename V1, typename V2>
inline void next_async(const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, const cuda::event_t *start_event, const cuda::event_t *done_event, bool append_history, callback_t &&callback)
template<typename V1, typename V2>
inline void next_async(size_t id, const cuda::cuda_viewable<V1> &input_buffer, const cuda::cuda_viewable<V2> &output_buffer, const cuda::event_t *start_event, const cuda::event_t *done_event, bool append_history, callback_t &&callback)

Protected Types

using job_t = std::function<void()>

Protected Functions

inline void _recalculate(const config_t &prior, bool lightweight = true)
inline auto &_next_slot()
template<typename V1, typename V2>
inline auto _next_block(slot_t &slot, size_t id, const cuda::cuda_viewable<V1> &input_buffer_, const cuda::cuda_viewable<V2> &output_buffer_, const cuda::event_t *start_event, const cuda::event_t *done_event, bool append_history)
template<typename V1, typename V2>
inline auto _dispatch_block(slot_t &slot, size_t id, size_t count, const cuda::cuda_viewable<V1> &input_buffer_, const cuda::cuda_viewable<V2> &output_buffer_, const cuda::event_t *start_event, const cuda::event_t *done_event, bool append_history)
inline auto _wait_block(slot_t &slot, size_t id)
inline void _worker_loop()
template<typename T>
inline void _sync_with_device(const xt::xtensor<T, 1> &host, cuda::cuda_device_tensor_t<cuda::device_type<T>> &device)

Protected Attributes

std::shared_ptr<spdlog::logger> _log
sync::queue_t<job_t> _jobs
std::thread _worker
std::mutex _mutex
cuda::event_t _update_complete
cuda::stream_t _update_stream
size_t _next_slot_index = 0
std::vector<slot_t> _slots
size_t _fft_plan_length = 0
cuda::cuda_device_tensor_t<index_element_t> _resample_before_index
cuda::cuda_device_tensor_t<index_element_t> _resample_after_index
cuda::cuda_device_tensor_t<float_element_t> _resample_before_weight
cuda::cuda_device_tensor_t<float_element_t> _resample_after_weight
cuda::cuda_device_tensor_t<input_element_t> _average_record_buffer
cuda::cuda_device_tensor_t<float_element_t> _average_record
cuda::cuda_device_tensor_t<uint8_t> _average_internal_storage
size_t _average_record_index
size_t _average_record_count
cuda::cuda_device_tensor_t<cuda::complex<float_element_t>> _complex_filter
template<typename derived_t_>
struct vortex::endpoint::cuda_tensor : public vortex::endpoint::detail::notify

Public Types

using derived_t = derived_t_

Public Functions

inline auto &derived_cast()
inline const auto &derived_cast() const
inline const auto &stream()

Protected Attributes

cuda::stream_t _stream
template<typename executor_t, typename tensor_t, typename derived_t>
struct vortex::endpoint::detail::cuda_tensor_impl : public vortex::endpoint::cuda_tensor<derived_t>

Subclassed by vortex::endpoint::detail::cuda_device_tensor_impl< T, radial_format_executor_t, radial_cuda_device_tensor< T > >, vortex::endpoint::detail::cuda_device_tensor_impl< T, stack_format_executor_t, stack_cuda_device_tensor< T > >, vortex::endpoint::detail::cuda_host_tensor_impl< T, stack_format_executor_t, stack_cuda_host_tensor< T > >

Public Functions

inline cuda_tensor_impl(std::shared_ptr<executor_t> executor, std::vector<size_t> shape, std::shared_ptr<spdlog::logger> log = nullptr)
template<size_t N>
inline cuda_tensor_impl(std::shared_ptr<executor_t> executor, const std::array<size_t, N> &shape, std::shared_ptr<spdlog::logger> log = nullptr)
inline cuda_tensor_impl(std::shared_ptr<executor_t> executor, std::shared_ptr<sync::lockable<tensor_t>> tensor, std::shared_ptr<spdlog::logger> log = nullptr)
inline const auto &tensor() const
inline const auto &executor() const

Protected Attributes

std::shared_ptr<executor_t> _executor
std::optional<std::vector<size_t>> _shape
std::shared_ptr<sync::lockable<tensor_t>> _tensor
std::shared_ptr<spdlog::logger> _log

Private Functions

inline void _check()
template<typename T>
struct vortex::cuda::detail::cuda_type_t

Public Types

using type = T
template<>
struct vortex::cuda::detail::cuda_type_t<std::complex<double>>

Public Types

using type = cuda_complex_t<double>::type
template<>
struct vortex::cuda::detail::cuda_type_t<std::complex<float>>

Public Types

using type = cuda_complex_t<float>::type
template<typename T>
class vortex::cuda::detail::cuda_view_t : public vortex::cuda::cuda_viewable<cuda_view_t<T>>, public vortex::detail::dynamic_view_t<T, fixed_cuda_view_t<T>, cuda_view_t<T>>

Public Types

using base_t = vortex::detail::dynamic_view_t<T, fixed_cuda_view_t<T>, cuda_view_t<T>>

Public Functions

inline cuda_view_t()
template<typename S1>
inline cuda_view_t(T *data, const S1 &shape, const cuda::device_t &device)
template<typename O, typename S1>
inline cuda_view_t(const O &other, T *data, const S1 &shape)
template<typename V>
inline cuda_view_t(const cuda_viewable<V> &other)
inline const auto &device() const
inline bool is_accessible() const
inline bool is_accessible(device_t device2) const

Protected Attributes

cuda::device_t _device
template<typename derived_t>
class cuda_viewable : public vortex::viewable<derived_t>

Subclassed by vortex::alazar::alazar_viewable< alazar_view_t< T > >, vortex::alazar::alazar_viewable< derived_t >

struct vortex::engine::engine_config_t::cycle_t

Public Members

std::vector<node> subgraph
template<typename channel_t_>
struct vortex::io::daqmx_config_t

Public Types

using channel_t = channel_t_

Public Functions

inline size_t &samples_per_second()
inline const size_t &samples_per_second() const
inline size_t &samples_per_block()
inline const size_t &samples_per_block() const
inline void validate()

Public Members

std::string name = "unknown"
std::string source = "pfi0"
daqmx::edge_t edge = daqmx::edge_t::rising
size_t divisor = 1
struct vortex::io::daqmx_config_t::[anonymous] clock
size_t blocks_to_buffer = 1
seconds readwrite_timeout = seconds(1)
std::vector<channel_t> channels
bool stop_on_error = true

Protected Functions

inline bool _port_name_contains_multiple_channels(const std::string &s)

Protected Attributes

size_t _samples_per_block = 100
size_t _samples_per_second   = 100'000
template<typename config_t_>
class vortex::io::daqmx_io_t

Public Types

using config_t = config_t_
using analog_element_t = float64
using digital_element_t = uInt32
using callback_t = std::function<void(size_t, std::exception_ptr)>

Public Functions

inline daqmx_io_t(std::shared_ptr<spdlog::logger> log = nullptr)
inline virtual ~daqmx_io_t()
inline const config_t &config() const
inline void initialize(config_t config)
template<typename ...Vs, typename = typename std::enable_if_t<(is_cpu_viewable<Vs> && ...)>>
inline size_t next(size_t count, const std::tuple<Vs...> &streams)
template<typename ...Vs, typename = typename std::enable_if_t<(is_cpu_viewable<Vs> && ...)>>
inline size_t next(size_t id, size_t count, const std::tuple<Vs...> &streams)
template<typename ...Vs, typename = typename std::enable_if_t<(is_cpu_viewable<Vs> && ...)>>
inline void next_async(size_t count, const std::tuple<Vs...> &streams, callback_t &&callback)
template<typename ...Vs, typename = typename std::enable_if_t<(is_cpu_viewable<Vs> && ...)>>
inline void next_async(size_t id, size_t count, const std::tuple<Vs...> &streams, callback_t &&callback)
inline void prepare()
inline void start()
inline void stop()
inline bool running() const

Protected Types

using job_t = std::function<void()>

Protected Functions

template<typename ...Vs>
inline auto _next_block(size_t id, size_t count, const std::tuple<Vs...> &streams)
template<typename ...Vs>
inline size_t _process_block(size_t id, size_t count, const std::tuple<Vs...> &streams)
inline void _worker_loop()
template<typename B>
inline void _check_buffer(const B &buffer, size_t samples, size_t channel)

Protected Attributes

std::shared_ptr<spdlog::logger> _log
std::atomic_bool _abort = false
sync::queue_t<job_t> _jobs
std::thread _worker
xt::xtensor<analog_element_t, 2> _analog_output_buffer
xt::xtensor<analog_element_t, 2> _analog_input_buffer
xt::xtensor<digital_element_t, 2> _digital_output_buffer
xt::xtensor<digital_element_t, 2> _digital_input_buffer
daqmx::daqmx_t _daqmx
std::mutex _mutex
config_t _config
class vortex::daqmx::daqmx_t

Public Functions

daqmx_t()
daqmx_t(std::string task_name)
daqmx_t(const daqmx_t &other) = delete
daqmx_t &operator=(const daqmx_t &other) = delete
daqmx_t(daqmx_t &&other)
daqmx_t &operator=(daqmx_t &&other)
virtual ~daqmx_t()
void create_digital_output(const std::string &line_name)
void create_digital_input(const std::string &line_name)
void create_analog_voltage_output(const std::string &port_name, float64 min, float64 max)
void create_analog_voltage_input(const std::string &port_name, float64 min, float64 max, terminal_t terminal = terminal_t::referenced)
void configure_sample_clock(const std::string &source, sample_mode_t sample_mode, size_t samples_per_second, size_t samples_per_channel, size_t divisor = 1, edge_t edge = edge_t::rising)
void set_output_buffer_size(size_t samples_per_channel)
void set_input_buffer_size(size_t samples_per_channel)
void set_regeneration(bool enable)
void write_analog(size_t samples_per_channel, const xt::xtensor<float64, 2> &buffer)
void write_analog(size_t samples_per_channel, const xt::xtensor<float64, 2> &buffer, const seconds &timeout)
void write_digital(size_t samples_per_channel, const xt::xtensor<uInt32, 2> &buffer)
void write_digital(size_t samples_per_channel, const xt::xtensor<uInt32, 2> &buffer, const seconds &timeout)
void read_analog(size_t samples_per_channel, xt::xtensor<float64, 2> &buffer)
void read_analog(size_t samples_per_channel, xt::xtensor<float64, 2> &buffer, const seconds &timeout)
void read_digital(size_t samples_per_channel, xt::xtensor<uInt32, 2> &buffer)
void read_digital(size_t samples_per_channel, xt::xtensor<uInt32, 2> &buffer, const seconds &timeout)
void start_task()
void stop_task()
void clear_task()
bool valid() const
const std::string &name() const
TaskHandle handle() const
bool running() const

Protected Attributes

TaskHandle _task = nullptr
std::string _name
bool _started = false
template<typename T>
struct datatype_helper
template<>
struct vortex::storage::detail::datatype_helper<double>

Public Static Functions

static inline auto value()
template<>
struct vortex::storage::detail::datatype_helper<float>

Public Static Functions

static inline auto value()
template<>
struct vortex::storage::detail::datatype_helper<int16_t>

Public Static Functions

static inline auto value()
template<>
struct vortex::storage::detail::datatype_helper<int32_t>

Public Static Functions

static inline auto value()
template<>
struct vortex::storage::detail::datatype_helper<int64_t>

Public Static Functions

static inline auto value()
template<>
struct vortex::storage::detail::datatype_helper<int8_t>

Public Static Functions

static inline auto value()
template<>
struct vortex::storage::detail::datatype_helper<uint16_t>

Public Static Functions

static inline auto value()
template<>
struct vortex::storage::detail::datatype_helper<uint32_t>

Public Static Functions

static inline auto value()
template<>
struct vortex::storage::detail::datatype_helper<uint64_t>

Public Static Functions

static inline auto value()
template<>
struct vortex::storage::detail::datatype_helper<uint8_t>

Public Static Functions

static inline auto value()
struct vortex::endpoint::detail::default_volume_shape_t

Public Static Functions

template<typename config_t>
static inline auto shape(const config_t &config)
struct detail
template<typename T>
class device_array_t
struct vortex::acquire::detail::alazar_config_t::device_t

Public Members

U32 system_index = 1
U32 board_index = 1
struct vortex::io::channel::digital_input_t : public vortex::io::detail::digital_t

Public Functions

inline void apply(daqmx::daqmx_t &daqmx, std::shared_ptr<spdlog::logger> &log) const
struct vortex::io::channel::digital_output_t : public vortex::io::detail::digital_t

Public Functions

inline void apply(daqmx::daqmx_t &daqmx, std::shared_ptr<spdlog::logger> &log) const
struct vortex::io::detail::digital_t : public vortex::io::detail::base_t

Subclassed by vortex::io::channel::digital_input_t, vortex::io::channel::digital_output_t

Public Functions

inline bool operator==(const digital_t &o) const

Public Members

std::string line_name

Public Static Attributes

static const size_t max_bits = 32
struct vortex::engine::engine_config_t::divide_t

Public Members

std::vector<node> subgraph
struct vortex::acquire::dso_config_t

Subclassed by vortex::acquire::detail::alazar_config_t< clock_t, trigger_t, option_t >, vortex::acquire::detail::alazar_config_t< clock_t_, trigger_t_, option_t_ >

Public Functions

inline virtual ~dso_config_t()
inline virtual std::array<size_t, 3> shape() const
inline virtual size_t channels_per_sample() const
inline size_t &samples_per_record()
inline const size_t &samples_per_record() const
inline size_t &records_per_block()
inline const size_t &records_per_block() const

Protected Attributes

size_t _samples_per_record = 1024
size_t _records_per_block = 1000
struct vortex::alazar::board_t::info_t::dsp_t

Public Functions

double max_trigger_rate_per_fft_length(U32 fft_length) const

Public Members

dsp_module_handle handle
U32 type
U16 major
U16 minor
struct vortex::alazar::board_t::info_t::dsp_t::[anonymous] version
U32 max_record_length
channel_t supported_channels
bool fft_time_domain_supported = false
bool fft_subtractor_supported = false
template<typename T>
struct dtype
template<>
struct vortex::storage::detail::numpy::dtype<double>

Public Static Attributes

static constexpr static auto name   = "float64"
template<>
struct vortex::storage::detail::numpy::dtype<float>

Public Static Attributes

static constexpr static auto name   = "float32"
template<>
struct vortex::storage::detail::numpy::dtype<int16_t>

Public Static Attributes

static constexpr static auto name   = "int16"
template<>
struct vortex::storage::detail::numpy::dtype<int32_t>

Public Static Attributes

static constexpr static auto name   = "int32"
template<>
struct vortex::storage::detail::numpy::dtype<int64_t>

Public Static Attributes

static constexpr static auto name   = "int64"
template<>
struct vortex::storage::detail::numpy::dtype<int8_t>

Public Static Attributes

static constexpr static auto name   = "int8"
template<>
struct vortex::storage::detail::numpy::dtype<std::complex<double>>

Public Static Attributes

static constexpr static auto name   = "complex128"
template<>
struct vortex::storage::detail::numpy::dtype<std::complex<float>>

Public Static Attributes

static constexpr static auto name   = "complex64"
template<>
struct vortex::storage::detail::numpy::dtype<uint16_t>

Public Static Attributes

static constexpr static auto name   = "uint16"
template<>
struct vortex::storage::detail::numpy::dtype<uint32_t>

Public Static Attributes

static constexpr static auto name   = "uint32"
template<>
struct vortex::storage::detail::numpy::dtype<uint64_t>

Public Static Attributes

static constexpr static auto name   = "uint64"
template<>
struct vortex::storage::detail::numpy::dtype<uint8_t>

Public Static Attributes

static constexpr static auto name   = "uint8"
struct vortex::acquire::trigger::dual_external_t

Public Functions

template<typename board_t>
inline void apply(board_t &board, std::shared_ptr<spdlog::logger> &log) const

Public Members

size_t range_millivolts = 2500
std::array<float, 2> level_ratios = {0.09f, 0.09f}
size_t delay_samples = 80
alazar::trigger_slope_t initial_slope = alazar::trigger_slope_t::positive
alazar::coupling_t coupling = alazar::coupling_t::DC
template<typename T, typename static_t_, typename dynamic_t>
class vortex::detail::dynamic_view_t : public vortex::detail::base_view_t<T, xt::svector<size_t>, xt::svector<ptrdiff_t>>

Public Functions

inline dynamic_view_t()
template<typename S1>
inline dynamic_view_t(T *data, const S1 &shape)
template<size_t N>
inline dynamic_view_t(const static_t<N> &other)
inline auto index(std::initializer_list<size_t> idx) const
inline auto range(size_t end) const
inline auto range(size_t start, size_t end) const
inline auto morph_right(size_t dim) const
inline bool is_contiguous() const

Protected Types

using base_t = base_view_t<T, xt::svector<size_t>, xt::svector<ptrdiff_t>>
template<size_t N2>
using static_t = typename static_t_::template of_dimension<N2>
struct vortex::engine::adapter::endpoint : public vortex::engine::adapter<block_t>::detail::base

Public Members

std::function<void(const std::optional<cuda::device_t>&, const std::optional<cuda::device_t>&)> allocate
std::function<void(const format::format_plan_t&, const block_t&, const spectra_stream_t&, const ascan_stream_t&)> handle
struct vortex::engine::detail::engine_plan_t::endpoint_plan

Public Members

size_t endpoint_index
template<typename block_t_, typename warp_t>
struct vortex::engine::engine_config_t

Public Types

using block_t = block_t_
using adapter = adapter<block_t>
using node = std::variant<divide_t, cycle_t, typename adapter::processor>
using process_graph_t = node
using format_graph_t = std::set<typename adapter::formatter>
using endpoint_graph_t = std::set<typename adapter::endpoint>

Public Functions

template<typename A, typename... Ns, typename = typename std::enable_if_t<std::tuple_size_v<std::tuple<Ns...>> >= 2> inline void add_acquisition (std::shared_ptr< A > &acquire, bool preload, bool master, Ns &&... nodes)
template<typename A, typename P>
inline void add_acquisition(std::shared_ptr<A> &acquire, bool preload, bool master, std::shared_ptr<P> &process)
template<typename A>
inline void add_acquisition(std::shared_ptr<A> &acquire, bool preload, bool master, process_graph_t graph)
template<typename P, typename ...Fs>
inline void add_processor(const std::shared_ptr<P> &processor, const std::shared_ptr<Fs>&... formatters)
template<typename F, typename ...EPs>
inline void add_formatter(const std::shared_ptr<F> &formatter, const std::shared_ptr<EPs>&... endpoints)
template<typename T>
inline void add_io(std::shared_ptr<T> &io, bool preload = true, bool master = false, size_t lead_samples = 0)
template<typename T>
inline void add_io(std::shared_ptr<T> &io, io_config options)
inline void validate()

Public Members

size_t records_per_block = 1000
size_t blocks_to_allocate = 4
size_t preload_count = 2
size_t blocks_to_acquire = 0
size_t post_scan_records = 0
warp_t scanner_warp = {scan::warp::none_t{}}
size_t galvo_output_channels = 2
size_t galvo_input_channels = 2
std::map<typename adapter::acquisition, acquire_config> acquisitions
std::map<typename adapter::processor, processor_config> processors
std::map<typename adapter::formatter, formatter_config> formatters
std::map<typename adapter::io, io_config> ios

Public Static Functions

template<typename ...Ns>
static inline auto divide(Ns&... nodes)
template<typename ...Ns>
static inline auto cycle(Ns&... nodes)

Protected Static Functions

template<typename N, typename ...Ns, typename = typename std::enable_if_t<std::is_same_v<std::decay_t<N>, node> || std::is_same_v<std::decay_t<N>, divide_t> || std::is_same_v<std::decay_t<N>, cycle_t>>>
static inline void _bind_to_graph(std::vector<node> &subgraph, N &head, Ns&... rest)
template<typename P, typename ...Ns>
static inline void _bind_to_graph(std::vector<node> &subgraph, std::shared_ptr<P> &head, Ns&... rest)
static inline void _bind_to_graph(std::vector<node> &subgraph)
template<typename T, typename ...Ts>
static inline auto _bind_to_set(format_graph_t &graph, T &head, Ts&... rest)
template<typename T, typename ...Ts>
static inline auto _bind_to_set(endpoint_graph_t &graph, T &head, Ts&... rest)
template<typename G>
static inline auto _bind_to_set(G&)
template<typename block_t>
struct vortex::engine::detail::engine_plan_t

Public Types

using adapter = adapter<block_t>
using spectra_stream_t = typename block_t::spectra_stream_t
using acquire_element_t = typename block_t::acquire_element_t
using spectra_stream_factory_t = typename adapter::spectra_stream_factory_t
using ascan_stream_factory_t = typename adapter::ascan_stream_factory_t
using shape_t = typename adapter::shape_t
using channels_t = std::vector<size_t>
using processor_sets = std::vector<std::vector<typename adapter::processor>>

Public Functions

inline engine_plan_t(std::shared_ptr<spdlog::logger> log = nullptr)
inline size_t allocate_spectra_buffer(bool elide, const typename adapter::acquisition &acquisition, spectra_stream_factory_t factory, const std::optional<cuda::device_t> &device, channels_t channels, shape_t shape)
inline size_t allocate_ascan_buffer(ascan_stream_factory_t factory, const std::optional<cuda::device_t> &device, shape_t shape)

Public Members

std::map<typename adapter::acquisition, acquire_plan> acquire
std::map<typename adapter::processor, process_plan> process
std::map<typename adapter::formatter, format_plan> format
std::map<typename adapter::endpoint, endpoint_plan> endpoint
std::vector<spectra_buffer> spectra_buffers
std::vector<ascan_buffer> ascan_buffers
size_t format_counter = 0
size_t endpoint_counter = 0
std::map<cuda::device_t, cuda::stream_t> transfer_streams
std::vector<size_t> io_lead_samples
std::shared_ptr<spdlog::logger> _log
struct vortex::engine::engine_t::engine_status

Public Members

bool active
size_t dispatched_blocks = 0
size_t inflight_blocks = 0
double dispatch_completion = 0
double block_utilization = 0
template<typename config_t_>
class vortex::engine::engine_t

Public Types

using config_t = config_t_
using block_t = typename config_t::block_t
using adapter = adapter<block_t>
using master_plan_t = detail::engine_plan_t<block_t>
using acquisition_t = typename adapter::acquisition
using processor_t = typename adapter::processor
using io_t = typename adapter::io
using formatter_t = typename adapter::formatter
using endpoint_t = typename adapter::endpoint
using acquire_element_t = typename block_t::acquire_element_t
using process_element_t = typename block_t::process_element_t
using analog_element_t = typename block_t::analog_element_t
using digital_elment_t = typename block_t::digital_element_t
using process_sets = typename master_plan_t::processor_sets
using scan_queue_t = scan_queue_t<typename block_t::scan_stream_t::element_t, typename block_t::marker_t>

Public Functions

inline engine_t(std::shared_ptr<spdlog::logger> log = nullptr)
inline virtual ~engine_t()
inline void initialize(config_t config)
inline auto &scan_queue()
inline const auto &scan_queue() const
inline void prepare()
inline void start()
inline void wait() const
inline auto wait_for(const std::chrono::high_resolution_clock::duration &timeout) const
inline auto done() const
inline void stop()
inline auto status() const
inline const auto &config() const
inline void set_event_callback(event_callback_t &&callback)
inline const auto &event_callback() const
inline void set_job_callback(job_callback_t &&callback)
inline const auto &job_callback() const

Protected Types

using session_t = detail::session_t<config_t, master_plan_t, scan_queue_t, block_t>

Protected Functions

inline auto _expand_acquire_graph(typename config_t::node &c)
inline void _plan_acquire(const acquisition_t &acquire, typename config_t::node &nodes)
inline std::optional<cuda::device_t> _choose_endpoint_device(const endpoint_t &endpoint)
inline void _handle_abort() const
template<typename stream_t, typename descriptor_t>
inline void _allocate_stream(const descriptor_t &desc, stream_t &stream_)
inline void _allocate_blocks()
inline void _release_blocks()

Protected Attributes

std::shared_ptr<scan_queue_t> _scan_queue
std::shared_ptr<spdlog::logger> _log
std::vector<block_t> _blocks
config_t _config
master_plan_t _master_plan
event_callback_t _event_callback
job_callback_t _job_callback
mutable std::exception_ptr _aborting_exception
std::optional<session_t> _session
mutable std::mutex _mutex
template<typename stream_t>
struct vortex::detail::stream_element_is_same::evaluate

Public Static Attributes

static constexpr auto value = std::is_same_v<element_t, typename std::decay_t<stream_t>::derived_t::element_t>
struct vortex::format::action::event

Public Functions

auto operator<=>(const event&) const = default

Public Members

counter_t sample
counter_t id
struct vortex::marker::event : public vortex::marker::detail::base

Public Types

using eid_t = size_t

Public Functions

inline event()
inline event(counter_t sample)
inline event(counter_t sample_, eid_t id_)
auto operator<=>(const event&) const = default

Public Members

eid_t id
class vortex::cuda::event_t

Public Functions

event_t(unsigned int flags = cudaEventDefault)
~event_t()
void sync() const
bool done() const
void record()
void record(const stream_t &stream)
float elapsed(const event_t &start) const
const cudaEvent_t &handle() const

Protected Attributes

cudaEvent_t _event
class vortex::sync::event_t

Public Functions

event_t(bool s = false)
void set()
void unset()
void change(bool s)
bool status() const
bool wait() const
bool wait_for(const std::chrono::high_resolution_clock::duration &timeout) const
void finish()

Protected Attributes

std::atomic_bool _set
std::atomic_bool