Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for static_cast (0.22 sec)

  1. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

        // cross-platform, return type of `Read` is `int64_t`.
        int64_t r = int64_t{pread(posix_file->fd, dst, requested_read_length,
                                  static_cast<off_t>(offset))};
        if (r > 0) {
          dst += r;
          offset += static_cast<uint64_t>(r);
          n -= r;  // safe as 0 < r <= n so n will never underflow
          read += r;
        } else if (r == 0) {
    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)
  2. tensorflow/c/eager/c_api_experimental.cc

      delete counter;
    }
    
    TFE_MonitoringCounterCell* TFE_MonitoringGetCellCounter0(
        TFE_MonitoringCounter0* counter) {
      return static_cast<TFE_MonitoringCounterCell*>(
          static_cast<void*>(counter->counter->GetCell()));
    }
    
    TFE_MonitoringCounter1* TFE_MonitoringNewCounter1(const char* name,
                                                      TF_Status* status,
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Apr 11 23:52:39 GMT 2024
    - 35.9K bytes
    - Viewed (3)
  3. tensorflow/c/c_api_test.cc

    TEST(CAPI, DataTypeEnum) {
      EXPECT_EQ(TF_FLOAT, static_cast<TF_DataType>(tensorflow::DT_FLOAT));
      EXPECT_EQ(TF_DOUBLE, static_cast<TF_DataType>(tensorflow::DT_DOUBLE));
      EXPECT_EQ(TF_INT32, static_cast<TF_DataType>(tensorflow::DT_INT32));
      EXPECT_EQ(TF_UINT8, static_cast<TF_DataType>(tensorflow::DT_UINT8));
      EXPECT_EQ(TF_INT16, static_cast<TF_DataType>(tensorflow::DT_INT16));
      EXPECT_EQ(TF_INT8, static_cast<TF_DataType>(tensorflow::DT_INT8));
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
  4. tensorflow/c/eager/dlpack_test.cc

          } else {
            EXPECT_EQ(dltensor_out->strides[i],
                      dltensor_out->shape[i + 1] * dltensor_out->strides[i + 1]);
          }
        }
      }
      const float* data_in = static_cast<const float*>(dltensor_in->data);
      const float* data_out = static_cast<const float*>(dltensor_out->data);
      for (size_t j = 0; j < num_elements; ++j) {
        EXPECT_EQ(data_out[j], data_in[j]);
      }
    
      TFE_CallDLManagedTensorDeleter(dlm_out);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Jun 30 03:04:46 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

          return;
        }
        *offset = static_cast<int64_t>(metadata->size());
        TF_SetStatus(status, TF_OK, "");
      }
    }
    
    void Cleanup(TF_WritableFile* file) {
      auto gcs_file = static_cast<GCSFile*>(file->plugin_file);
      delete gcs_file;
    }
    
    void Append(const TF_WritableFile* file, const char* buffer, size_t n,
                TF_Status* status) {
      auto gcs_file = static_cast<GCSFile*>(file->plugin_file);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Aug 23 06:55:53 GMT 2023
    - 46.9K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc

      ASSERT_EQ(read, -1) << "Read: " << read;
      ASSERT_EQ(TF_GetCode(status_), TF_NOT_FOUND) << TF_Message(status_);
      TF_SetStatus(status_, TF_OK, "");
    
      auto gcs_file =
          static_cast<tf_gcs_filesystem::GCSFile*>(filesystem_->plugin_filesystem);
      ASSERT_TRUE(WriteToServer(filepath, 0, content_view.length(),
                                &gcs_file->gcs_client, status_));
    
    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)
  7. tensorflow/c/c_api_experimental.cc

    namespace {
    typedef std::unique_ptr<TF_Function, decltype(&TF_DeleteFunction)>
        UniqueFuncPtr;
    }
    
    // struct TF_Operation { tensorflow::Node node; };
    static TF_Operation* ToTF_Operation(Node* node) {
      return static_cast<TF_Operation*>(static_cast<void*>(node));
    }
    
    void TF_EnableXLACompilation(TF_SessionOptions* options, unsigned char enable) {
      tensorflow::ConfigProto& config = options->options.config;
      auto* optimizer_options =
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  8. tensorflow/c/eager/dlpack.cc

      dlm_tensor->dl_tensor.byte_offset =
          0;  // TF doesn't handle the strides and byte_offsets here
      return static_cast<void*>(dlm_tensor);
    }
    
    TFE_TensorHandle* TFE_HandleFromDLPack(void* dlm, TF_Status* status,
                                           TFE_Context* ctx) {
      DLManagedTensor* dlmt = static_cast<DLManagedTensor*>(dlm);
      DLTensor* dl_tensor = &dlmt->dl_tensor;
      absl::optional<std::string> device_name =
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  9. tensorflow/c/experimental/grappler/grappler.cc

      const int len = std::min(num_values, static_cast<int>(nodes.size()));
      char* p = static_cast<char*>(storage);
      for (int index = 0; index < len; ++index) {
        const std::string& s = nodes[index];
        values[index] = p;
        lengths[index] = s.size();
        if ((p + s.size()) > (static_cast<char*>(storage) + storage_size)) {
          tsl::Set_TF_Status_from_Status(
              status,
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 15K bytes
    - Viewed (1)
  10. tensorflow/c/eager/c_api_unified_experimental_eager.cc

      if (TF_GetCode(s) != TF_OK) {
        return nullptr;
      }
      return wrap(static_cast<AbstractContext*>(unwrap(c_ctx)));
    }
    
    TF_AbstractTensor* TF_CreateAbstractTensorFromEagerTensor(TFE_TensorHandle* t,
                                                              TF_Status* s) {
      return wrap(static_cast<AbstractTensorHandle*>(unwrap(t)));
    }
    
    TFE_TensorHandle* TF_AbstractTensorGetEagerTensor(TF_AbstractTensor* at,
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jun 25 04:40:46 GMT 2020
    - 3.2K bytes
    - Viewed (0)
Back to top