MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / WrapUnique

Function WrapUnique

tensorflow/core/util/ptr_util.h:59–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57// Note: Cannot wrap pointers to array of unknown bound (i.e. U(*)[]).
58template <typename T>
59std::unique_ptr<T> WrapUnique(T* ptr) {
60 static_assert(!std::is_array<T>::value || std::extent<T>::value != 0,
61 "types T[0] or T[] are unsupported");
62 return std::unique_ptr<T>(ptr);
63}
64
65template <typename T, typename... Args>
66typename helper::MakeUniqueResult<T>::scalar MakeUnique(Args&&... args) {

Callers 15

XlaCompilerMethod · 0.85
RunMethod · 0.85
CreateFromProtoMethod · 0.85
CreateNaryMethod · 0.85
CreateReplicaIdMethod · 0.85
CreatePartitionIdMethod · 0.85
CreateAfterAllMethod · 0.85
CreateTokenMethod · 0.85
CreateAddDependencyMethod · 0.85
CreateWhileMethod · 0.85
CreateConditionalMethod · 0.85

Calls

no outgoing calls

Tested by 5

SetUpMethod · 0.68
SetUpMethod · 0.68
TEST_FFunction · 0.68
TESTFunction · 0.68