Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 54 for reinterpret (0.2 sec)

  1. tensorflow/c/eager/c_api.cc

            methods_.summarize(data_, &c_status), TF_DeleteBuffer);
        if (!c_status.status.ok()) {
          return c_status.status;
        }
        summary = std::string(reinterpret_cast<const char*>(summary_buffer->data),
                              summary_buffer->length);
        return absl::OkStatus();
      }
    
     private:
      void* const data_;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  2. tensorflow/c/eager/c_api_experimental_test.cc

      TF_Buffer* result1 = TF_NewBuffer();
      TFE_MonitoringSamplerCellValue(cell1, result1);
      tensorflow::HistogramProto histogram1;
      EXPECT_TRUE(histogram1.ParseFromString(
          {reinterpret_cast<const char*>(result1->data), result1->length}));
      EXPECT_EQ(histogram1.sum(), 3.0);
      TF_DeleteBuffer(result1);
      TFE_MonitoringDeleteSampler1(sampler1);
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  3. tensorflow/c/eager/abstract_operation.h

      lengths.reserve(values.size());
      for (const auto& s : values) {
        raw_strs.emplace_back(s.data());
        lengths.emplace_back(s.size());
      }
      return SetAttrStringList(attr_name,
                               reinterpret_cast<const void**>(raw_strs.data()),
                               lengths.data(), values.size());
    }
    
    namespace internal {
    struct AbstractOperationDeleter {
      void operator()(AbstractOperation* p) const {
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Jul 14 16:20:41 GMT 2021
    - 6.8K bytes
    - Viewed (0)
  4. tensorflow/c/eager/gradients.cc

    // may lead to collisions. Introduce another way to get a unique id for this
    // tensor.
    int64_t ToId(const AbstractTensorHandle* t) {
      return static_cast<int64_t>(reinterpret_cast<uintptr_t>(t));
    }
    
    Status ZerosLike(AbstractContext* ctx, AbstractTensorHandle* t,
                     AbstractTensorHandle** result) {
      AbstractOperationPtr op(ctx->CreateOperation());
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/gradients/tape/tape_operation.cc

                                         const int64_t* values, int num_values) {
      forward_op_.attrs.Set(
          attr_name, gtl::ArraySlice<const int64_t>(
                         reinterpret_cast<const int64_t*>(values), num_values));
      return parent_op_->SetAttrIntList(attr_name, values, num_values);
    }
    Status TapeOperation::SetAttrTypeList(const char* attr_name,
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jun 07 01:53:35 GMT 2022
    - 9K bytes
    - Viewed (1)
  6. tensorflow/c/c_api_test.cc

      TF_DeleteStatus(s);
    }
    
    void Deallocator(void* data, size_t, void* arg) {
      tensorflow::cpu_allocator()->DeallocateRaw(data);
      *reinterpret_cast<bool*>(arg) = true;
    }
    
    TEST(CAPI, Tensor) {
      const int num_bytes = 6 * sizeof(float);
      float* values =
          reinterpret_cast<float*>(tensorflow::cpu_allocator()->AllocateRaw(
              TF_TensorDefaultAlignment(), num_bytes));
      int64_t dims[] = {2, 3};
    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)
  7. tensorflow/c/eager/parallel_device/parallel_device_lib.h

            TF_NewTensor(
                datatype_enum, /*dims=*/nullptr, /*num_dims=*/0,
                device_value.release(), sizeof(DataType),
                [](void* data, size_t, void* arg) {
                  delete reinterpret_cast<DataType*>(data);
                },
                nullptr),
            TF_DeleteTensor);
        // TODO(allenl): Here and when executing regular operations, we could hold
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Apr 25 15:21:13 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  8. tensorflow/c/c_api.cc

      for (int i = 0; i < shape.dims(); ++i) {
        dims.push_back(shape.dim_size(i));
        nelems *= shape.dim_size(i);
      }
      CHECK_EQ(nelems, 0);
      return TF_NewTensor(
          dtype, reinterpret_cast<const int64_t*>(dims.data()), shape.dims(),
          reinterpret_cast<void*>(&empty), 0, [](void*, size_t, void*) {}, nullptr);
    }
    
    static void TF_Run_Helper(
        Session* session, const char* handle, const TF_Buffer* run_options,
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  9. tensorflow/c/experimental/filesystem/modular_filesystem.cc

          "Failed to load TF_InitPlugin symbol for DSO: ", dso_path);
    
      // Step 3: Call `TF_InitPlugin`
      TF_FilesystemPluginInfo info;
      memset(&info, 0, sizeof(info));
      auto TF_InitPlugin =
          reinterpret_cast<int (*)(TF_FilesystemPluginInfo*)>(dso_symbol);
      TF_InitPlugin(&info);
    
      // Step 4: Do the actual registration
      return filesystem_registration::RegisterFilesystemPluginImpl(&info);
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 23.1K bytes
    - Viewed (0)
  10. tensorflow/c/c_api_experimental.cc

      auto iter = builder->attr_names.insert(attr_name).first;
      builder->Set(*iter, tensorflow::gtl::ArraySlice<const tensorflow::DataType>(
                              reinterpret_cast<const tensorflow::DataType*>(values),
                              num_values));
    }
    
    void TF_AttrBuilderCheckCanRunOnDevice(TF_AttrBuilder* builder,
                                           const char* device_type,
    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)
Back to top