|
ngscopeclient v0.2.1
|
A constellation diagram. More...
#include <ConstellationWaveform.h>


Public Member Functions | |
| ConstellationWaveform (size_t width, size_t height) | |
| ConstellationWaveform (const ConstellationWaveform &)=delete | |
| ConstellationWaveform & | operator= (const ConstellationWaveform &)=delete |
| int64_t * | GetAccumData () |
| Returns the raw accumulator sample data. | |
| AcceleratorBuffer< int64_t > & | GetAccumBuffer () |
| Returns the raw accumulator sample data's buffer object. | |
| void | Normalize () |
| Normalizes the waveform so that the output buffer has values in the range [0, 1]. | |
| void | Normalize (vk::raii::CommandBuffer &cmdBuf, std::shared_ptr< ComputePipeline > normalizeReducePipe, std::shared_ptr< ComputePipeline > normalizeScalePipe, AcceleratorBuffer< int64_t > &nmaxBuf) |
| size_t | GetTotalSymbols () |
| Returns the number of integrated symbols in the constellation. | |
| void | IntegrateSymbols (size_t symbols) |
| Marks the waveform as having integrated another batch of symbols. | |
| virtual void | FreeGpuMemory () override |
| Free GPU-side memory if we are short on VRAM or do not anticipate using this waveform for a while. | |
| virtual bool | HasGpuBuffer () override |
| Returns true if we have at least one buffer resident on the GPU. | |
| virtual void | PrepareForCpuAccessNonblocking (vk::raii::CommandBuffer &cmdBuf) override |
| Indicates that this waveform is going to be used by the CPU in the near future. | |
| virtual void | PrepareForCpuAccess () override |
| Indicates that this waveform is going to be used by the CPU in the near future. | |
| virtual void | PrepareForGpuAccess () override |
| Indicates that this waveform is going to be used by the GPU in the near future. | |
| virtual void | MarkSamplesModifiedFromCpu () override |
| Indicates that this waveform's sample data has been modified on the CPU and the GPU-side copy is no longer coherent. | |
| virtual void | MarkSamplesModifiedFromGpu () override |
| Indicates that this waveform's sample data has been modified on the GPU and the CPU-side copy is no longer coherent. | |
| virtual void | MarkModifiedFromCpu () override |
| Indicates that this waveform's sample data and timestamps have been modified on the CPU and the GPU-side copy is no longer coherent. | |
| virtual void | MarkModifiedFromGpu () override |
| Indicates that this waveform's sample data and timestamps have been modified on the GPU and the CPU-side copy is no longer coherent. | |
Public Member Functions inherited from DensityFunctionWaveform | |
| DensityFunctionWaveform (size_t width, size_t height) | |
| Initialize a new density function waveform of a given size. | |
| DensityFunctionWaveform (const DensityFunctionWaveform &)=delete | |
| DensityFunctionWaveform & | operator= (const DensityFunctionWaveform &)=delete |
| virtual void | Rename (const std::string &name="") override |
| Assigns a human readable name to the waveform for debug purposes. | |
| float * | GetData () |
| Returns a pointer to the CPU-side sample data buffer. | |
| AcceleratorBuffer< float > & | GetOutData () |
| Returns a reference to the output data buffer object. | |
| size_t | GetHeight () |
| Returns the height of the bitmap in pixels. | |
| size_t | GetWidth () |
| Returns the width of the bitmap in pixels. | |
| virtual void | clear () override |
| Remove all samples from this waveform. | |
| virtual void | Resize (size_t unused) override |
| Reallocates buffers so the waveform contains the specified number of samples. | |
| virtual void | Reserve (size_t unused) override |
| Preallocates buffers without changing the usable size of the waveform. | |
| virtual void | PrepareForGpuAccessNonblocking (vk::raii::CommandBuffer &cmdBuf) override |
| Indicates that this waveform is going to be used by the GPU in the near future. | |
| virtual size_t | size () const override |
| Returns the number of samples in this waveform. | |
| virtual size_t | capacity () const override |
| Returns the number of samples allocated in this waveform. | |
| virtual size_t | GetMemoryBytes () const override |
| Gets the amount of memory consumed by the waveform (may be CPU, GPU, or mirrored) | |
Public Member Functions inherited from WaveformBase | |
| WaveformBase () | |
| Creates an empty waveform. | |
| WaveformBase (const WaveformBase &rhs) | |
| Creates a waveform, copying metadata from another. | |
| virtual bool | empty () |
| Returns true if this waveform contains no samples, false otherwise. | |
| virtual std::string | GetText (size_t i) |
| Returns the text representation of a given protocol sample. | |
| virtual std::string | GetColor (size_t) |
| Returns the displayed color (in HTML #rrggbb or #rrggbbaa notation) of a given protocol sample. | |
| virtual uint32_t | GetColorCached (size_t i) |
| Returns the packed RGBA32 color of a given protocol sample calculated by CacheColors() | |
| virtual void | CacheColors () |
| Updates the cache of packed colors to avoid string parsing every frame. | |
Public Attributes | |
| float | m_saturationLevel |
| Value to pre-normalize the waveform to before clipping to the range [0, 1]. Must be non-negative. | |
Public Attributes inherited from WaveformBase | |
| int64_t | m_timescale |
| The time scale, in X axis units (usually femtoseconds) per timestep, used by this channel. | |
| time_t | m_startTimestamp |
| Start time of the acquisition, integer part. | |
| int64_t | m_startFemtoseconds |
| Start time of the acquisition, fractional part (femtoseconds since since the UTC second) | |
| int64_t | m_triggerPhase |
| Offset, in X axis units (usually femtoseconds), from the trigger to the sampling clock. | |
| uint8_t | m_flags |
| Flags that apply to this waveform. Bitfield containing zero or more WaveformFlags_t values. | |
| uint64_t | m_revision |
| Revision number. | |
Protected Attributes | |
| AcceleratorBuffer< int64_t > | m_accumdata |
| Raw accumulator buffer, not normalized. | |
| size_t | m_totalSymbols |
| The number of symbols which have been integrated so far. | |
Protected Attributes inherited from DensityFunctionWaveform | |
| size_t | m_width |
| Buffer width, in pixels. | |
| size_t | m_height |
| Buffer height, in pixels. | |
| AcceleratorBuffer< float > | m_outdata |
| Pixel buffer. | |
Protected Attributes inherited from WaveformBase | |
| AcceleratorBuffer< uint32_t > | m_protocolColors |
| Cache of packed RGBA32 data with colors for each protocol decode event. Empty for non-protocol waveforms. | |
| uint64_t | m_cachedColorRevision |
| Revision we last cached colors of. | |
Additional Inherited Members | |
Public Types inherited from WaveformBase | |
| enum | WaveformFlags_t { WAVEFORM_CLIPPING = 1 } |
| Flags which may apply to m_flags. More... | |
A constellation diagram.
Free GPU-side memory if we are short on VRAM or do not anticipate using this waveform for a while.
Implements WaveformBase.
Returns true if we have at least one buffer resident on the GPU.
Implements WaveformBase.
Marks the waveform as having integrated another batch of symbols.
| symbols | Number of symbols integrated |
Indicates that this waveform's sample data and timestamps have been modified on the CPU and the GPU-side copy is no longer coherent.
Reimplemented from DensityFunctionWaveform.
Indicates that this waveform's sample data and timestamps have been modified on the GPU and the CPU-side copy is no longer coherent.
Reimplemented from DensityFunctionWaveform.
Indicates that this waveform's sample data has been modified on the CPU and the GPU-side copy is no longer coherent.
Reimplemented from DensityFunctionWaveform.
Indicates that this waveform's sample data has been modified on the GPU and the CPU-side copy is no longer coherent.
Reimplemented from DensityFunctionWaveform.
| void ConstellationWaveform::Normalize | ( | ) |
Normalizes the waveform so that the output buffer has values in the range [0, 1].
The normalization process can saturate, see m_saturationLevel for detailed discussion of this behavior
Indicates that this waveform is going to be used by the CPU in the near future.
This ensures the CPU-side copy of the data is coherent with the most recently modified (CPU or GPU side) copy.
Reimplemented from DensityFunctionWaveform.
|
inlineoverridevirtual |
Indicates that this waveform is going to be used by the CPU in the near future.
This ensures the CPU-side copy of the data is coherent with the most recently modified (CPU or GPU side) copy.
Reimplemented from DensityFunctionWaveform.
Indicates that this waveform is going to be used by the GPU in the near future.
This ensures the GPU-side copy of the data is coherent with the most recently modified (CPU or GPU side) copy.
Reimplemented from DensityFunctionWaveform.
|
protected |
Raw accumulator buffer, not normalized.
2D array of width*height values, each counting the number of hits at that pixel location
| float ConstellationWaveform::m_saturationLevel |
Value to pre-normalize the waveform to before clipping to the range [0, 1]. Must be non-negative.
The default of 1.0 means the input range is mapped losslessly to [0, 1].
Values less than 1.0 result in the output never reaching full scale.
Values greater than 1.0 allow clipping; for example a saturation level of 2.0 means the input is mapped to [0, 2] then clipped to [0, 1]. This is equivalent to mapping the low half of the input values to [0, 1] and saturating beyond that point.