- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for Memcpy (0.11 sec)
-
tensorflow/c/eager/c_api_test_util.cc
TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, float value) { float data[] = {value}; TF_Status* status = TF_NewStatus(); TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_FLOAT, nullptr, 0, status); memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t)); TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TF_DeleteTensor(t);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/msan2_cmsan.go
#cgo CPPFLAGS: -fsanitize=memory #include <string.h> #include <stdint.h> #include <stdlib.h> void f(int32_t *p, int n) { int32_t * volatile q = (int32_t *)malloc(sizeof(int32_t) * n); memcpy(p, q, n * sizeof(*p)); free(q); } void g(int32_t *p, int n) { if (p[4] != 1) { abort(); } } */ import "C" import ( "unsafe" ) func main() { a := make([]int32, 10)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 710 bytes - Viewed (0) -
src/runtime/race/race_darwin_amd64.go
//go:cgo_import_dynamic madvise madvise "" //go:cgo_import_dynamic malloc_num_zones malloc_num_zones "" //go:cgo_import_dynamic malloc_zones malloc_zones "" //go:cgo_import_dynamic memcpy memcpy "" //go:cgo_import_dynamic memset_pattern16 memset_pattern16 "" //go:cgo_import_dynamic mkdir mkdir "" //go:cgo_import_dynamic mprotect mprotect "" //go:cgo_import_dynamic open open "" //go:cgo_import_dynamic pipe pipe ""
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 16 19:29:22 UTC 2023 - 5.6K bytes - Viewed (0) -
src/runtime/race/race_darwin_arm64.go
//go:cgo_import_dynamic madvise madvise "" //go:cgo_import_dynamic malloc_num_zones malloc_num_zones "" //go:cgo_import_dynamic malloc_zones malloc_zones "" //go:cgo_import_dynamic memcpy memcpy "" //go:cgo_import_dynamic memset_pattern16 memset_pattern16 "" //go:cgo_import_dynamic mkdir mkdir "" //go:cgo_import_dynamic mprotect mprotect "" //go:cgo_import_dynamic open open "" //go:cgo_import_dynamic pipe pipe ""
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 16 19:29:22 UTC 2023 - 5.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/string_utils.cc
// big-endian platform. memcpy(*buffer, &num_strings, sizeof(int32_t)); // Set offset of strings. int32_t start = sizeof(int32_t) * (num_strings + 2); for (size_t i = 0; i < offset_.size(); i++) { // TODO(b/165919229): This code will need changing if/when we port to a // big-endian platform. int32_t offset = start + offset_[i]; memcpy(*buffer + sizeof(int32_t) * (i + 1), &offset, sizeof(int32_t));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 12 21:41:49 UTC 2024 - 2.9K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/grad_test_helper.cc
ASSERT_EQ(num_elem_numerical, num_elem_analytical); float* dnumerical = new float[num_elem_numerical]{0}; memcpy(&dnumerical[0], TF_TensorData(numerical_tensor), TF_TensorByteSize(numerical_tensor)); float* danalytical = new float[num_elem_analytical]{0}; memcpy(&danalytical[0], TF_TensorData(analytical_tensor), TF_TensorByteSize(analytical_tensor));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 28 13:53:47 UTC 2024 - 5K bytes - Viewed (0) -
tensorflow/c/eager/gradient_checker.cc
TF_RETURN_IF_ERROR(GetValue(theta, &theta_tensor)); // Get number of elements and fill data. int num_elems = TF_TensorElementCount(theta_tensor); vector<float> theta_data(num_elems); memcpy(theta_data.data(), TF_TensorData(theta_tensor), TF_TensorByteSize(theta_tensor)); // Initialize space for the numerical gradient. vector<float> dtheta_approx(num_elems);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 15 09:49:45 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/c/experimental/stream_executor/stream_executor_test.cc
EXPECT_EQ(stream->stream_id, 14); std::memcpy(host_dst, device_src->opaque, size); }; StreamExecutor* executor = GetExecutor(0); TF_ASSERT_OK_AND_ASSIGN(auto stream, executor->CreateStream()); size_t size = sizeof(int); int src_data = 34; int dst_data = 2; DeviceMemoryBase device_src(&src_data, size); TF_ASSERT_OK(stream->Memcpy(&dst_data, device_src, size)); ASSERT_EQ(dst_data, 34); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 20 19:54:04 UTC 2024 - 26.5K bytes - Viewed (0) -
src/cmd/cgo/internal/swig/testdata/stdio/main.swig
/* A trivial example of wrapping a C library using SWIG. */ %{ #include <stdio.h> #include <stdlib.h> %} %typemap(gotype) const char * "string" %typemap(in) const char * %{ $1 = malloc($input.n + 1); memcpy($1, $input.p, $input.n); $1[$input.n] = '\0'; %} %typemap(freearg) const char * %{ free($1); %} FILE *fopen(const char *name, const char *mode); int fclose(FILE *);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:07 UTC 2023 - 563 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/msan_fail.go
package main /* #include <string.h> #include <stdint.h> #include <stdlib.h> void f(int32_t *p, int n) { int32_t * volatile q = (int32_t *)malloc(sizeof(int32_t) * n); memcpy(p, q, n * sizeof(*p)); free(q); } void g(int32_t *p, int n) { if (p[4] != 1) { // We shouldn't get here; msan should stop us first. exit(0); } } */ import "C" import (
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 701 bytes - Viewed (0)