#include <Explicit.h>
Definition at line 62 of file Explicit.h.
◆ ExplicitDataChef()
◆ generate()
- Note
- This emulates TensorFlow int DynamicBuffer::WriteToBuffer(char** buffer) method Memory structure: int32_t count int32_t offsets[count + 1] string values[count] where string is like std::string without ending null byte
Implements souschef::DataChef.
Definition at line 36 of file Explicit.cpp.
37{
38 std::vector<uint8_t> res;
39
40
41 write_value(res, count);
42
43
44 int32_t start = sizeof(int32_t) * (count + 2);
45 write_value(res, start);
46
47
49 for (uint32_t n = 0; n < count; ++n)
50 {
51 std::string const value = (n < _values.size()) ? _values.at(n) : std::string{};
54 }
55
56 for (uint32_t n = 0; n < count; ++n)
57 {
58 std::string const value = (n < _values.size()) ? _values.at(n) : std::string{};
59 const uint8_t *
arr =
reinterpret_cast<const uint8_t *
>(value.c_str());
60
61 for (uint32_t b = 0;
b < value.length(); ++
b)
62 {
63 res.emplace_back(arr[b]);
64 }
65 }
66
67 return res;
68}
__global uchar * offset(const Image *img, int x, int y)
References offset().
◆ insert()
Definition at line 74 of file Explicit.h.
74{ _values.emplace_back(value); }
The documentation for this class was generated from the following files: