- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for Buf (0.14 sec)
-
tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc
const size_t size = 256; std::vector<char> buf; buf.reserve(size); for (int i = 0; i < size; i++) { buf.push_back(i); } // The fetcher just fetches slices of the buffer. auto fetcher = [&buf](const string& filename, size_t offset, size_t n, char* buffer, TF_Status* status) -> int64_t { int64_t bytes_transferred; if (offset < buf.size()) {
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Fri Oct 15 03:16:57 GMT 2021 - 23.2K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
EXPECT_EQ(TF_DATA_LOSS, static_cast<TF_Code>(tensorflow::error::DATA_LOSS)); } TEST(CAPI, GetAllOpList) { TF_Buffer* buf = TF_GetAllOpList(); tensorflow::OpList op_list; EXPECT_TRUE(op_list.ParseFromArray(buf->data, buf->length)); EXPECT_GT(op_list.op_size(), 0); TF_DeleteBuffer(buf); } TEST(CAPI, SetShape) { TF_Status* s = TF_NewStatus(); TF_Graph* graph = TF_NewGraph();
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Mon Apr 15 03:35:10 GMT 2024 - 96.9K bytes - Viewed (3) -
tensorflow/c/experimental/grappler/grappler_internal.h
struct TFStatusDeleter { void operator()(TF_Status* s) const { TF_DeleteStatus(s); } }; using OwnedTFStatus = std::unique_ptr<TF_Status, TFStatusDeleter>; struct TFBufferDeleter { void operator()(TF_Buffer* buf) const { TF_DeleteBuffer(buf); } }; using OwnedTFBuffer = std::unique_ptr<TF_Buffer, TFBufferDeleter>; class CGraphOptimizer : public CustomGraphOptimizer { public:
C - Registered: Tue Feb 27 12:39:08 GMT 2024 - Last Modified: Wed Jun 08 08:58:23 GMT 2022 - 3.5K bytes - Viewed (1) -
tensorflow/c/eager/c_api_experimental_test.cc
auto* cell2 = TFE_MonitoringGetCellStringGauge2(gauge2, "foo", "bar"); TFE_MonitoringStringGaugeCellSet(cell2, "str"); auto* buf = new TF_Buffer; TFE_MonitoringStringGaugeCellValue(cell2, buf); string data(static_cast<const char*>(buf->data), buf->length); TF_DeleteBuffer(buf); EXPECT_EQ(data, "str"); TFE_MonitoringDeleteStringGauge2(gauge2); TF_DeleteStatus(status); }
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Aug 03 03:14:26 GMT 2023 - 31.5K bytes - Viewed (1) -
tensorflow/c/experimental/grappler/grappler.cc
OwnedTFStatus c_status(TF_NewStatus()); OwnedTFBuffer graph_buf(TF_NewBuffer()); OwnedTFBuffer optimized_graph_buf(TF_NewBuffer()); TF_RETURN_IF_ERROR(MessageToBuffer(item.graph, graph_buf.get())); optimizer_.optimize_func(c_optimizer_, graph_buf.get(), reinterpret_cast<const TF_GrapplerItem*>(&item), optimized_graph_buf.get(), c_status.get());
C++ - Registered: Tue Feb 27 12:39:08 GMT 2024 - Last Modified: Wed Sep 06 19:12:29 GMT 2023 - 15K bytes - Viewed (1) -
tensorflow/c/eager/c_api_experimental.cc
} const void TFE_MonitoringStringGaugeCellValue( TFE_MonitoringStringGaugeCell* cell, TF_Buffer* buf) { tensorflow::string value = cell->cell.value(); void* data = tensorflow::port::Malloc(value.length()); value.copy(static_cast<char*>(data), value.length(), 0); buf->data = data; buf->length = value.length(); buf->data_deallocator = [](void* data, size_t length) { tensorflow::port::Free(data); }; }
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Apr 11 23:52:39 GMT 2024 - 35.9K bytes - Viewed (3) -
tensorflow/c/experimental/filesystem/modular_filesystem.cc
for (size_t i = 0; i < values.size(); i++) { memset(&option_values[i], 0, sizeof(option_values[i])); option_values[i].buffer_val.buf = const_cast<char*>(values[i].c_str()); option_values[i].buffer_val.buf_length = values[i].size(); } option_value.values = &option_values[0]; option.value = &option_value; UniquePtrTo_TF_Status plugin_status(TF_NewStatus(), TF_DeleteStatus);
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Wed Sep 06 19:12:29 GMT 2023 - 23.1K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental.h
// Serialize `attrs` as a tensorflow::NameAttrList protocol buffer (into `buf`), // containing the op name and a map of its attributes. TF_CAPI_EXPORT extern void TFE_OpAttrsSerialize(const TFE_OpAttrs* attrs, TF_Buffer* buf, TF_Status* status);
C - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Wed Feb 21 22:37:46 GMT 2024 - 39.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test.cc
if (use_tfrt) { TF_Buffer* buf = TF_NewBuffer(); TFE_GetExecutedOpNames(ctx, buf, status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); #ifndef NDEBUG if (enable_grappler) EXPECT_NE(strstr(static_cast<const char*>(buf->data), "tf.Mul"), nullptr); else EXPECT_NE(strstr(static_cast<const char*>(buf->data), "tf.Add"), nullptr); #endif
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Aug 03 20:50:20 GMT 2023 - 94.6K bytes - Viewed (1) -
tensorflow/c/experimental/grappler/grappler_test.cc
Status s = MessageToBuffer(g_def, g_buf); TF_ASSERT_OK(s); TF_FunctionLibraryDefinition* func = TF_NewFunctionLibraryDefinition(g_buf, status); TF_LookUpOpDef(func, "Add", op_buf, status); string actual_string(reinterpret_cast<const char*>(op_buf->data), op_buf->length); ASSERT_EQ(TF_OK, TF_GetCode(status)); const OpDef* expected_op_def;
C++ - Registered: Tue Feb 27 12:39:08 GMT 2024 - Last Modified: Thu Apr 13 22:30:58 GMT 2023 - 11.6K bytes - Viewed (0)