Type-erased single-element read.
Implementations copy the native element at coords into out if type matches their native type, otherwise no-op. out points to a caller-owned buffer of exactly sizeof(native type) bytes.
Implements MayaFlux::Kakshya::NDDataContainer< DataVariant >.
Definition at line 736 of file WindowContainer.cpp.
740{
741 if (
type !=
typeid(uint8_t) ||
coords.size() < 3)
742 return;
743
747
750 return;
753 return;
754 *
static_cast<uint8_t*
>(
out) = (*
pixels)[idx];
755 });
756}
const std::vector< float > * pixels
std::vector< float > * out
std::vector< glm::ivec3 > coords
vk::PhysicalDeviceType type
Memory::Seqlock m_data_lock
std::vector< DataVariant > m_processed_data
ContainerDataStructure m_structure
bool seqlock_read_void(const Seqlock &lock, uint32_t max_attempts, Fn &&fn)
Invoke a void read functor under a Seqlock with a bounded retry count.
static uint64_t get_channel_count(const std::vector< DataDimension > &dimensions)
Extract channel count from dimensions.
static uint64_t get_width(const std::vector< DataDimension > &dimensions)
Extract width from image/video dimensions.
References coords, out, pixels, and type.