Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 492 for memcpy (0.25 sec)

  1. tensorflow/c/eager/c_api_unified_experimental_test.cc

        ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
    
        memcpy(&result_data[0], TF_TensorData(f_t), TF_TensorByteSize(f_t));
    
        // Verify results for each output
        for (int j = 0; j < 4; j++) {
          ASSERT_EQ(result_data[j], expected_outputs[idx][j]);
        }
    
        TF_DeleteTensor(f_t);
      }
    
      // Free memory associated with add and MatMul outputs
      for (int idx = 0; idx < 3; ++idx) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri May 19 21:44:52 GMT 2023
    - 39.1K bytes
    - Viewed (0)
  2. tensorflow/c/eager/c_api_test_util.h

                                               const int64_t* dims, int num_dims) {
      TF_Status* status = TF_NewStatus();
      TF_Tensor* t = TFE_AllocateHostTensor(ctx, datatype, dims, num_dims, status);
      memcpy(TF_TensorData(t), data, TF_TensorByteSize(t));
      TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status);
      CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      TF_DeleteTensor(t);
      TF_DeleteStatus(status);
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Jul 17 23:43:59 GMT 2023
    - 7.7K bytes
    - Viewed (0)
  3. tensorflow/c/eager/gradient_checker_test.cc

      ASSERT_EQ(errors::OK, s.code()) << s.message();
      auto num_elem_numerical = TF_TensorElementCount(numerical_tensor);
      ASSERT_EQ(num_elem_numerical, num_grad);
    
      float* dnumerical = new float[num_elem_numerical]{0};
      memcpy(&dnumerical[0], TF_TensorData(numerical_tensor),
             TF_TensorByteSize(numerical_tensor));
    
      for (int j = 0; j < num_grad; j++) {
        ASSERT_NEAR(dnumerical[j], expected_grad[j], abs_error);
      }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Apr 14 10:03:59 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  4. tensorflow/c/c_test_util.cc

      int64_t num_values = 1;
      for (int i = 0; i < num_dims; ++i) {
        num_values *= dims[i];
      }
      TF_Tensor* t =
          TF_AllocateTensor(TF_INT8, dims, num_dims, sizeof(char) * num_values);
      memcpy(TF_TensorData(t), values, sizeof(char) * num_values);
      return t;
    }
    
    TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims,
                           const int32_t* values) {
      int64_t num_values = 1;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

          // The block extends past the end of the slice we're reading.
          end -= (pos + data.size()) - (offset + n);
        }
        if (begin < end) {
          size_t bytes_to_copy = end - begin;
          memcpy(&buffer[total_bytes_transferred], &*begin, bytes_to_copy);
          total_bytes_transferred += bytes_to_copy;
        }
        if (data.size() < block_size_) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 16 01:39:09 GMT 2020
    - 11.1K bytes
    - Viewed (0)
  6. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

    TensorHandlePtr VectorFloatTensorHandle(const std::vector<float>& v,
                                            TF_Status* status) {
      const int num_bytes = v.size() * sizeof(float);
      float* values = new float[v.size()];
      memcpy(values, v.data(), num_bytes);
      int64_t dims = v.size();
      std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> tensor(
          TF_NewTensor(TF_FLOAT, &dims, 1 /* num_dims */, values, num_bytes,
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jun 15 15:44:44 GMT 2021
    - 12.5K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api_remote_test_util.cc

      ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status);
      TFE_DeleteTensorHandle(retval_task0);
      float product[4] = {0};
      EXPECT_EQ(sizeof(product), TF_TensorByteSize(t));
      memcpy(&product[0], TF_TensorData(t), TF_TensorByteSize(t));
      TF_DeleteTensor(t);
      EXPECT_EQ(7, product[0]);
      EXPECT_EQ(10, product[1]);
      EXPECT_EQ(15, product[2]);
      EXPECT_EQ(22, product[3]);
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Dec 11 22:56:03 GMT 2020
    - 9.1K bytes
    - Viewed (0)
  8. tensorflow/c/c_api.cc

      status->status = s->session->PRunSetup(input_names, output_names,
                                             target_oper_names, &new_handle);
      if (status->status.ok()) {
        char* buf = new char[new_handle.size() + 1];
        memcpy(buf, new_handle.c_str(), new_handle.size() + 1);
        *handle = buf;
      }
    }
    
    void TF_PRun(TF_DeprecatedSession* s, const char* handle,
                 // Input tensors
    C++
    - Registered: Tue Apr 30 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_registration.cc

        info->plugin_memory_free(info->ops[i].scheme);
        info->plugin_memory_free(info->ops[i].filesystem_ops);
        info->plugin_memory_free(info->ops[i].random_access_file_ops);
        info->plugin_memory_free(info->ops[i].writable_file_ops);
        info->plugin_memory_free(info->ops[i].read_only_memory_region_ops);
      }
      info->plugin_memory_free(info->ops);
      return status;
    }
    
    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)
  10. tensorflow/c/eager/c_api_experimental_test.cc

      TFE_DeleteExecutor(old_executor);
      TFE_DeleteContext(ctx);
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      float product[4] = {0};
      EXPECT_EQ(sizeof(product), TF_TensorByteSize(t));
      memcpy(&product[0], TF_TensorData(t), TF_TensorByteSize(t));
      TF_DeleteTensor(t);
      EXPECT_EQ(7, product[0]);
      EXPECT_EQ(10, product[1]);
      EXPECT_EQ(15, product[2]);
      EXPECT_EQ(22, product[3]);
    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)
Back to top