- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 438 for capsule (0.29 sec)
-
tensorflow/cc/experimental/libtf/value.h
return v; } /// Constructs a TaggedValue with type CAPSULE with a default destructor. template <class T> static TaggedValue Capsule(T* data) { return Capsule(static_cast<void*>(data), [](void* x) { delete static_cast<T*>(x); }); } /// Constructs a TaggedValue with type CAPSULE with a custom destructor. static TaggedValue Capsule(void* data, void (*deleter)(void*)) { TaggedValue v;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 13 05:23:45 UTC 2024 - 20.4K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/tests/value_test.cc
ASSERT_EQ(alloc_count, 0); void* ptr_value = new Cool(); { TaggedValue capsule = TaggedValue::Capsule(static_cast<void*>(ptr_value), [](void* x) { delete static_cast<Cool*>(x); }); ASSERT_EQ(alloc_count, 1); ASSERT_EQ(capsule.capsule(), ptr_value); test_moved = std::move(capsule); ASSERT_EQ(capsule.type(), TaggedValue::NONE); // NOLINT test_copy = test_moved;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Sep 01 11:18:25 UTC 2022 - 3.4K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/mlir/mlir_transform.cc
// transforms. // auto obj = TaggedValue::Dict(); Object obj; obj.Set( String("_module"), Handle(impl::TaggedValue::Capsule(new mlir::OwningOpRef<mlir::ModuleOp>( std::move(module_or).value())))); auto get_string = [](Object self) { auto ref = self.Get<internal::Capsule>(String("_module")) ->cast<mlir::OwningOpRef<mlir::ModuleOp>*>();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jul 12 16:28:19 UTC 2022 - 3K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/value_iostream.h
OutList(o_, x->begin(), x->end(), '(', ')'); return o_; } std::ostream& operator()(const DictPtr& x) { o_ << *x; return o_; } std::ostream& operator()(const Capsule& x) { o_ << "Capsule(" << x.get() << ")"; return o_; } std::ostream& operator()(const Func& x) { o_ << "Func"; return o_; } std::ostream& operator()(const TaggedValueTensor& x) { o_ << "Tensor";
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Aug 30 21:44:45 UTC 2022 - 2.4K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/runtime/runtime.h
num_elements, "\n", "Data size: ", data.size(), "\n")); } auto maybe_capsule = Get<internal::Capsule>(String("ctx")); if (!maybe_capsule.status().ok()) { return maybe_capsule.status(); } auto capsule = maybe_capsule.value(); auto ctx = capsule.cast<tensorflow::ImmediateExecutionContext*>(); tensorflow::AbstractTensorPtr t(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Sep 01 11:18:25 UTC 2022 - 4.4K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/tests/tensor_test.cc
TaggedValue MakeContext(T runtime) { AbstractContext* ctx_raw = nullptr; Status s = BuildImmediateExecutionContext(runtime, &ctx_raw); // ASSERT_EQ(tensorflow::errors::OK, s.code()) << s.message(); return TaggedValue::Capsule(static_cast<void*>(ctx_raw), [](void* p) { tensorflow::internal::AbstractContextDeleter()( static_cast<AbstractContext*>(p)); }); } } // namespace TEST_P(UnifiedCAPI, HoldTensors) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 19 21:44:52 UTC 2023 - 5K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/object.h
}; namespace internal { /// @brief The Capsule class for holding pointers. class Capsule final : public Handle { public: /// Statically cast the TaggedValue capsule to type `T`. template <class T> T cast() { return static_cast<T>(value_.capsule()); } private: // Private since it is in general unsafe. explicit Capsule(TaggedValue v) : Handle(std::move(v)) {} template <class T>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 11 08:05:36 UTC 2023 - 23.6K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/runtime/runtime.cc
Runtime::Runtime(AbstractContext* ctx) { TaggedValue ctx_capsule = TaggedValue::Capsule(static_cast<void*>(ctx), [](void* p) { auto ctx = static_cast<AbstractContext*>(p); ctx->Release(); }); Set(String("ctx"), Handle(ctx_capsule)); auto Load = [](Object self, String name) -> Object { auto ctx_capsule = self.Get<internal::Capsule>(String("ctx")).value(); auto ctx = ctx_capsule.cast<AbstractContext*>();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Sep 01 11:18:25 UTC 2022 - 7.4K bytes - Viewed (0) -
platforms/core-execution/execution/src/main/java/org/gradle/internal/execution/UnitOfWork.java
*/ File getWorkspace(); /** * For work capable of incremental execution this is the object to query per-property changes through; * {@link Optional#empty()} for non-incremental-capable work. */ Optional<InputChangesInternal> getInputChanges(); /**
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Nov 22 09:41:28 UTC 2023 - 13.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/reflect/TypeResolverTest.java
.where( new TypeCapture<Iterable<Map<?, V>>>() {}.capture(), new TypeCapture<Iterable<Map<String, Integer>>>() {}.capture()); assertEquals( new TypeCapture<K>() {}.capture(), resolver.resolveType(new TypeCapture<K>() {}.capture())); assertEquals(Integer.class, resolver.resolveType(new TypeCapture<V>() {}.capture())); } public <T> void testWhere_mapFromWildcard() {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 9.7K bytes - Viewed (0)