- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for write (0.15 sec)
-
tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem_helper.cc
if (src_fd < 0) return -1; // When creating file, use the same permissions as original mode_t open_mode = mode & (S_IRWXU | S_IRWXG | S_IRWXO); // O_WRONLY | O_CREAT | O_TRUNC: // Open file for write and if file does not exist, create the file. // If file exists, truncate its size to 0. int dst_fd = open(dst, O_WRONLY | O_CREAT | O_TRUNC, open_mode); if (dst_fd < 0) { close(src_fd); return -1; }
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Thu Jan 16 05:36:52 GMT 2020 - 2.1K bytes - Viewed (1) -
tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc
return ::testing::AssertionFailure() << TF_Message(status); auto writer = gcs_client->WriteObject(bucket, object); writer.write(content + offset, length); writer.Close(); if (writer.metadata()) { return ::testing::AssertionSuccess(); } else { return ::testing::AssertionFailure() << writer.metadata().status().message(); } }
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Mon Aug 31 12:04:23 GMT 2020 - 24.9K bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/plugins/posix/copy_file_portable.cc
rc = read(src_fd, buffer.get(), chunk); if (rc < 0) return -1; int total_write = 0; int total_read = rc; while (total_write < total_read && rc > 0) { rc = write(dst_fd, buffer.get() + total_write, chunk - total_write); if (rc < 0) return -1; total_write += rc; bytes_transferred += rc; offset += rc; } } return bytes_transferred; }
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Fri Nov 22 21:23:55 GMT 2019 - 1.9K bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc
} static void Append(const TF_WritableFile* file, const char* buffer, size_t n, TF_Status* status) { auto posix_file = static_cast<PosixFile*>(file->plugin_file); size_t r = fwrite(buffer, 1, n, posix_file->handle); if (r != n) TF_SetStatusFromIOError(status, errno, posix_file->filename); else TF_SetStatus(status, TF_OK, ""); }
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Sun Mar 24 20:08:23 GMT 2024 - 15.8K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
const string input_name = signature_def.inputs().at(tensorflow::kRegressInputs).name(); const string output_name = signature_def.outputs().at(tensorflow::kRegressOutputs).name(); // Write {0, 1, 2, 3} as tensorflow::Example inputs. Tensor input(tensorflow::DT_STRING, TensorShape({4})); for (int64_t i = 0; i < input.NumElements(); ++i) { tensorflow::Example example;
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/filesystem/plugins/gcs/gcs_filesystem.cc
return; } TF_VLog(3, "Append: gs://%s/%s size %u", gcs_file->bucket.c_str(), gcs_file->object.c_str(), n); gcs_file->sync_need = true; gcs_file->outfile.write(buffer, n); if (!gcs_file->outfile) TF_SetStatus(status, TF_INTERNAL, "Could not append to the internal temporary file."); else TF_SetStatus(status, TF_OK, ""); }
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Wed Aug 23 06:55:53 GMT 2023 - 46.9K bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/modular_filesystem_registration.cc
// after loading up. Thus, malicious plugins can't alter functionality to // probe for gadgets inside core TensorFlow. We can even protect the area // of memory where the copies reside to not allow any more writes to it // after all copies are created. template <typename T> static std::unique_ptr<const T> CopyToCore(const T* plugin_ops, size_t plugin_size) {
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Mar 07 22:08:43 GMT 2023 - 12.8K bytes - Viewed (0)