Skip to content

Commit

Permalink
tensorflow r1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
memo committed Oct 31, 2017
1 parent fe03592 commit 512a6e9
Show file tree
Hide file tree
Showing 520 changed files with 66,747 additions and 26,711 deletions.
6 changes: 3 additions & 3 deletions libs/google/include/google/protobuf/any.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class LIBPROTOBUF_EXPORT AnyMetadata {

// Unpacks the payload into the given message. Returns false if the message's
// type doesn't match the type specified in the type URL (i.e., the full
// name after the last "/" of the type URL doesn't match the message's actaul
// name after the last "/" of the type URL doesn't match the message's actual
// full name) or parsing the payload has failed.
bool UnpackTo(Message* message) const;

Expand All @@ -90,8 +90,8 @@ extern const char kTypeGoogleProdComPrefix[]; // "type.googleprod.com/".

// Get the proto type name from Any::type_url value. For example, passing
// "type.googleapis.com/rpc.QueryOrigin" will return "rpc.QueryOrigin" in
// *full_type_name. Returns false if type_url does not start with
// "type.googleapis.com" or "type.googleprod.com".
// *full_type_name. Returns false if the type_url does not have a "/"
// in the type url separating the full type name.
bool ParseAnyTypeUrl(const string& type_url, string* full_type_name);

// See if message is of type google.protobuf.Any, if so, return the descriptors
Expand Down
23 changes: 13 additions & 10 deletions libs/google/include/google/protobuf/any.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 29 additions & 27 deletions libs/google/include/google/protobuf/api.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 26 additions & 6 deletions libs/google/include/google/protobuf/arena.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,17 @@ class LIBPROTOBUF_EXPORT Arena {
// (unless the destructor is trivial). Hence, from T's point of view, it is as
// if the object were allocated on the heap (except that the underlying memory
// is obtained from the arena).
#if LANG_CXX11
template <typename T, typename... Args> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
static T* Create(::google::protobuf::Arena* arena, Args&&... args) {
if (arena == NULL) {
return new T(std::forward<Args>(args)...);
} else {
return arena->CreateInternal<T>(google::protobuf::internal::has_trivial_destructor<T>::value,
std::forward<Args>(args)...);
}
}
#endif
template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
static T* Create(::google::protobuf::Arena* arena) {
if (arena == NULL) {
Expand Down Expand Up @@ -644,6 +655,17 @@ class LIBPROTOBUF_EXPORT Arena {
AllocateAligned(RTTI_TYPE_ID(T), sizeof(T) * num_elements));
}

#if LANG_CXX11
template <typename T, typename... Args> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
T* CreateInternal(bool skip_explicit_ownership, Args&&... args) {
T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T)))
T(std::forward<Args>(args)...);
if (!skip_explicit_ownership) {
AddListNode(t, &internal::arena_destruct_object<T>);
}
return t;
}
#endif
template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
T* CreateInternal(bool skip_explicit_ownership) {
T* t = new (AllocateAligned(RTTI_TYPE_ID(T), sizeof(T))) T();
Expand Down Expand Up @@ -773,22 +795,20 @@ class LIBPROTOBUF_EXPORT Arena {

template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
T* CreateMessageInternal(typename T::InternalArenaConstructable_*) {
return CreateInternal<T, Arena*>(SkipDeleteList<T>(static_cast<T*>(0)),
this);
return CreateInternal<T>(SkipDeleteList<T>(static_cast<T*>(0)), this);
}

template <typename T, typename Arg> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
T* CreateMessageInternal(typename T::InternalArenaConstructable_*,
const Arg& arg) {
return CreateInternal<T, Arena*>(SkipDeleteList<T>(static_cast<T*>(0)),
this, arg);
return CreateInternal<T>(SkipDeleteList<T>(static_cast<T*>(0)), this, arg);
}

template <typename T, typename Arg1, typename Arg2> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
T* CreateMessageInternal(typename T::InternalArenaConstructable_*,
const Arg1& arg1, const Arg2& arg2) {
return CreateInternal<T, Arena*>(SkipDeleteList<T>(static_cast<T*>(0)),
this, arg1, arg2);
return CreateInternal<T>(SkipDeleteList<T>(static_cast<T*>(0)), this, arg1,
arg2);
}

// CreateInArenaStorage is used to implement map field. Without it,
Expand Down
Loading

0 comments on commit 512a6e9

Please sign in to comment.