#include <networkscratch.h>
Definition at line 50 of file networkscratch.h.
◆ IO() [1/2]
Definition at line 53 of file networkscratch.h.
54 : int_mode_(scratch->int_mode_ && src.int_mode()), scratch_space_(scratch) {
55 network_io_ =
56 int_mode_ ? scratch_space_->int_stack_.Borrow() : scratch_space_->float_stack_.Borrow();
57 }
◆ IO() [2/2]
tesseract::NetworkScratch::IO::IO |
( |
| ) |
|
|
inline |
Definition at line 60 of file networkscratch.h.
60: int_mode_(false), network_io_(nullptr), scratch_space_(nullptr) {}
◆ ~IO()
tesseract::NetworkScratch::IO::~IO |
( |
| ) |
|
|
inline |
Definition at line 62 of file networkscratch.h.
62 {
63 if (scratch_space_ == nullptr) {
65 } else if (int_mode_) {
66 scratch_space_->int_stack_.Return(network_io_);
67 } else {
68 scratch_space_->float_stack_.Return(network_io_);
69 }
70 }
◆ 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 74 of file networkscratch.h.
74 {
75 if (scratch_space_ == nullptr) {
76 int_mode_ = scratch->int_mode_ && src.int_mode();
77 scratch_space_ = scratch;
78 network_io_ =
79 int_mode_ ? scratch_space_->int_stack_.Borrow() : scratch_space_->float_stack_.Borrow();
80 }
81 network_io_->
Resize(src, num_features);
82 }
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 84 of file networkscratch.h.
84 {
85 if (scratch_space_ == nullptr) {
86 int_mode_ = scratch->int_mode_ && int_mode;
87 scratch_space_ = scratch;
88 network_io_ =
89 int_mode_ ? scratch_space_->int_stack_.Borrow() : scratch_space_->float_stack_.Borrow();
90 }
91 network_io_->
Resize2d(int_mode, width, num_features);
92 }
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 95 of file networkscratch.h.
95 {
96 if (scratch_space_ == nullptr) {
97 int_mode_ = false;
98 scratch_space_ = scratch;
99 network_io_ = scratch_space_->float_stack_.Borrow();
100 }
102 }
void ResizeFloat(const NetworkIO &src, int num_features)
The documentation for this class was generated from the following file: