cl::sycl::stream Class Reference
Class that encapsulates a buffer that can be passed to the device and streamed to. More...
#include <stream.h>
Public Member Functions | |
stream (size_t bufferSize, size_t maxStatementSize, handler &cgh) | |
Constructor that takes a buffer size, a max statement size and a handler reference and constructs a stream of the buffer size, associated with the provided handler. More... | |
stream (const stream &)=default | |
Copy constructor. More... | |
stream (stream &&) noexcept=default | |
Move constructor. More... | |
stream & | operator= (const stream &)=default |
Copy assignment operator. More... | |
stream & | operator= (stream &&) noexcept=default |
Move assignment operator. More... | |
~stream () | |
Destructor, prints the buffer to stdout and resets the buffer. More... | |
size_t | get_size () const |
Member function that returns the buffer size. More... | |
size_t | get_max_statement_size () const |
Inline member function that returns the maximum statement size. More... | |
stream_mode | get_stream_mode () const |
Inline member function that returns the stream mode. More... | |
int | get_precision () const |
Inline member function that returns the precision value. More... | |
void | set_stream_mode (stream_mode mode) |
Inline member function that sets the stream mode. More... | |
void | set_precision (int precision) |
Inline member function that sets the precision value. More... | |
void | set_width (const int width) |
Sets the width used when displaying a stream element. More... | |
void | append_chars (const char *charBuffer, int size) const |
Member function that appends a char buffer to the stream's buffer. More... | |
std::shared_ptr< cl::sycl::storage_mem > | get_buffer () const |
Member function that returns a shared_ptr to the detail buffer object. More... | |
Friends | |
COMPUTECPP_EXPORT std::ostream & | operator<< (std::ostream &out, const stream &rhs) |
Friend function declaration to give global stream operator access to private members. More... | |
bool | operator== (const stream &lhs, const stream &rhs) |
Determines if lhs and rhs are equal. More... | |
bool | operator!= (const stream &lhs, const stream &rhs) |
Determines if lhs and rhs are not equal. More... | |
Detailed Description
Class that encapsulates a buffer that can be passed to the device and streamed to.
Used for debugging. Host only.
Constructor & Destructor Documentation
◆ stream() [1/3]
cl::sycl::stream::stream | ( | size_t | bufferSize, |
size_t | maxStatementSize, | ||
handler & | cgh | ||
) |
Constructor that takes a buffer size, a max statement size and a handler reference and constructs a stream of the buffer size, associated with the provided handler.
- Parameters
-
bufferSize The size of the stream's buffer. maxStatementSize The maximum size of a single statement in the stream's buffer. cgh A reference to the handler that the stream is to be associated with.
◆ stream() [2/3]
|
default |
Copy constructor.
◆ stream() [3/3]
|
defaultnoexcept |
Move constructor.
◆ ~stream()
cl::sycl::stream::~stream | ( | ) |
Destructor, prints the buffer to stdout and resets the buffer.
Member Function Documentation
◆ append_chars()
void cl::sycl::stream::append_chars | ( | const char * | charBuffer, |
int | size | ||
) | const |
Member function that appends a char buffer to the stream's buffer.
- Parameters
-
charBuffer The char buffer to be appended. The size of the char buffer to be appended.
◆ get_buffer()
std::shared_ptr<cl::sycl::storage_mem> cl::sycl::stream::get_buffer | ( | ) | const |
Member function that returns a shared_ptr to the detail buffer object.
- Returns
- A shared_ptr to the detail buffer object.
◆ get_max_statement_size()
|
inline |
◆ get_precision()
|
inline |
◆ get_size()
size_t cl::sycl::stream::get_size | ( | ) | const |
Member function that returns the buffer size.
- Returns
- The buffer size.
◆ get_stream_mode()
|
inline |
◆ operator=() [1/2]
Copy assignment operator.
- Returns
- Reference to this object
◆ operator=() [2/2]
Move assignment operator.
- Returns
- Reference to this object
◆ set_precision()
|
inline |
◆ set_stream_mode()
|
inline |
◆ set_width()
|
inline |
Friends And Related Function Documentation
◆ operator!=
◆ operator<<
|
friend |
Friend function declaration to give global stream operator access to private members.
- Parameters
-
out The output stream. rhs The stream object to be streamed into the output.
◆ operator==
The documentation for this class was generated from the following file: