#include <networkscratch.h>
Definition at line 53 of file networkscratch.h.
◆ IO() [1/2]
Definition at line 56 of file networkscratch.h.
57 : int_mode_(scratch->int_mode_ && src.int_mode()),
58 scratch_space_(scratch) {
59 network_io_ = int_mode_ ? scratch_space_->int_stack_.Borrow()
60 : scratch_space_->float_stack_.Borrow();
◆ IO() [2/2]
tesseract::NetworkScratch::IO::IO |
( |
| ) |
|
|
inline |
Definition at line 64 of file networkscratch.h.
64 : int_mode_(
false), network_io_(
nullptr), scratch_space_(
nullptr) {}
◆ ~IO()
tesseract::NetworkScratch::IO::~IO |
( |
| ) |
|
|
inline |
Definition at line 66 of file networkscratch.h.
67 if (scratch_space_ ==
nullptr) {
69 }
else if (int_mode_) {
70 scratch_space_->int_stack_.Return(network_io_);
72 scratch_space_->float_stack_.Return(network_io_);
◆ operator NetworkIO *()
tesseract::NetworkScratch::IO::operator NetworkIO * |
( |
| ) |
|
|
inline |
◆ operator*()
NetworkIO& tesseract::NetworkScratch::IO::operator* |
( |
| ) |
|
|
inline |
◆ operator->()
NetworkIO* tesseract::NetworkScratch::IO::operator-> |
( |
| ) |
|
|
inline |
◆ Resize()
Definition at line 78 of file networkscratch.h.
80 if (scratch_space_ ==
nullptr) {
81 int_mode_ = scratch->int_mode_ && src.int_mode();
82 scratch_space_ = scratch;
83 network_io_ = int_mode_ ? scratch_space_->int_stack_.Borrow()
84 : scratch_space_->float_stack_.Borrow();
86 network_io_->
Resize(src, num_features);
void Resize(const NetworkIO &src, int num_features)
◆ Resize2d()
void tesseract::NetworkScratch::IO::Resize2d |
( |
bool |
int_mode, |
|
|
int |
width, |
|
|
int |
num_features, |
|
|
NetworkScratch * |
scratch |
|
) |
| |
|
inline |
Definition at line 89 of file networkscratch.h.
91 if (scratch_space_ ==
nullptr) {
92 int_mode_ = scratch->int_mode_ && int_mode;
93 scratch_space_ = scratch;
94 network_io_ = int_mode_ ? scratch_space_->int_stack_.Borrow()
95 : scratch_space_->float_stack_.Borrow();
97 network_io_->
Resize2d(int_mode, width, num_features);
void Resize2d(bool int_mode, int width, int num_features)
◆ ResizeFloat()
void tesseract::NetworkScratch::IO::ResizeFloat |
( |
const NetworkIO & |
src, |
|
|
int |
num_features, |
|
|
NetworkScratch * |
scratch |
|
) |
| |
|
inline |
Definition at line 101 of file networkscratch.h.
103 if (scratch_space_ ==
nullptr) {
105 scratch_space_ = scratch;
106 network_io_ = scratch_space_->float_stack_.Borrow();
void ResizeFloat(const NetworkIO &src, int num_features)
The documentation for this class was generated from the following file: