Represents a batch of StringViews that all share the same underlying string buffer. More...
#include <StringViewBatch.hpp>
Public Member Functions | |
StringViewBatch (int concatenatedLength, sp::Vector< CharT > &&stringBuffer, sp::Vector< IntPairT > &&stringOffsetsAndLengths) | |
int | size () const |
Get the number of string views in the batch. More... | |
sp::Vec< int, 2 > | orderedPair (int i) const |
Get the (offset, length) ordered pair for the nth StringView. More... | |
sp::StringView< CharT > | read (int i) const |
Read the i'th StringView out of this container. More... | |
int | getTotalLength () const |
Represents a batch of StringViews that all share the same underlying string buffer.
These objects are constructed using the deviceView
, hostView
, mutableDeviceView
and mutableHostView
methods of StringBatch
, and consequently share the same memory layout as StringBatch
.
sp::Vec< int, 2 > sp::StringViewBatch< CharT, IntPairT >::orderedPair | ( | int | i | ) | const |
Get the (offset, length) ordered pair for the nth StringView.
sp::StringView< CharT > sp::StringViewBatch< CharT, IntPairT >::read | ( | int | i | ) | const |
Read the i'th StringView out of this container.
int sp::StringViewBatch< CharT, IntPairT >::size | ( | ) | const |
Get the number of string views in the batch.