Home
last modified time | relevance | path

Searched refs:ptr_ (Results 1 – 25 of 165) sorted by relevance

1234567

/third_party/grpc/third_party/upb/upb/
Ddef.hpp24 FieldDefPtr() : ptr_(nullptr) {} in FieldDefPtr()
25 explicit FieldDefPtr(const upb_fielddef* ptr) : ptr_(ptr) {} in FieldDefPtr()
27 const upb_fielddef* ptr() const { return ptr_; } in ptr()
28 explicit operator bool() const { return ptr_ != nullptr; } in operator bool()
34 const char* full_name() const { return upb_fielddef_fullname(ptr_); } in full_name()
36 Type type() const { return upb_fielddef_type(ptr_); } in type()
37 Label label() const { return upb_fielddef_label(ptr_); } in label()
38 const char* name() const { return upb_fielddef_name(ptr_); } in name()
39 const char* json_name() const { return upb_fielddef_jsonname(ptr_); } in json_name()
40 uint32_t number() const { return upb_fielddef_number(ptr_); } in number()
[all …]
/third_party/flutter/engine/flutter/fml/memory/
Dref_ptr.h68 RefPtr() : ptr_(nullptr) {} in RefPtr()
69 RefPtr(std::nullptr_t) : ptr_(nullptr) {} in RefPtr()
76 explicit RefPtr(U* p) : ptr_(p) { in RefPtr()
77 if (ptr_) in RefPtr()
78 ptr_->AddRef(); in RefPtr()
82 RefPtr(const RefPtr<T>& r) : ptr_(r.ptr_) { in RefPtr()
83 if (ptr_) in RefPtr()
84 ptr_->AddRef(); in RefPtr()
88 RefPtr(const RefPtr<U>& r) : ptr_(r.ptr_) { in RefPtr()
89 if (ptr_) in RefPtr()
[all …]
/third_party/protobuf/src/google/protobuf/
Darenastring.h66 void Set(T* p) { ptr_ = reinterpret_cast<uintptr_t>(p); } in Set()
67 T* Get() const { return reinterpret_cast<T*>(ptr_); } in Get()
69 bool IsNull() { return ptr_ == 0; } in IsNull()
72 uintptr_t ptr_;
78 if (ptr_ == default_value) { in Set()
81 *ptr_ = value; in Set()
91 inline const ::std::string& Get() const { return *ptr_; } in Get()
95 if (ptr_ == default_value) { in Mutable()
98 return ptr_; in Mutable()
107 if (ptr_ == default_value) { in Release()
[all …]
/third_party/boost/libs/unordered/test/objects/
Dminimal.hpp243 void* ptr_; member
246 void_ptr() : ptr_(0) {} in void_ptr()
248 template <typename T> explicit void_ptr(ptr<T> const& x) : ptr_(x.ptr_) {} in void_ptr()
252 operator bool() const { return !!ptr_; } in operator bool()
254 bool operator==(void_ptr const& x) const { return ptr_ == x.ptr_; } in operator ==()
255 bool operator!=(void_ptr const& x) const { return ptr_ != x.ptr_; } in operator !=()
266 void* ptr_; member in test::minimal::void_const_ptr
269 void_const_ptr() : ptr_(0) {} in void_const_ptr()
272 explicit void_const_ptr(const_ptr<T> const& x) : ptr_(x.ptr_) in void_const_ptr()
278 operator bool() const { return !!ptr_; } in operator bool()
[all …]
Dtest.hpp453 void* ptr_; member
456 void_ptr() : ptr_(0) {} in void_ptr()
458 template <typename T> explicit void_ptr(ptr<T> const& x) : ptr_(x.ptr_) {} in void_ptr()
462 operator bool() const { return !!ptr_; } in operator bool()
464 bool operator==(void_ptr const& x) const { return ptr_ == x.ptr_; } in operator ==()
465 bool operator!=(void_ptr const& x) const { return ptr_ != x.ptr_; } in operator !=()
476 void* ptr_; member in test::void_const_ptr
479 void_const_ptr() : ptr_(0) {} in void_const_ptr()
482 explicit void_const_ptr(const_ptr<T> const& x) : ptr_(x.ptr_) in void_const_ptr()
488 operator bool() const { return !!ptr_; } in operator bool()
[all …]
/third_party/boost/boost/locale/
Dhold_ptr.hpp25 hold_ptr() : ptr_(0) {} in hold_ptr()
29 explicit hold_ptr(T *v) : ptr_(v) {} in hold_ptr()
36 delete ptr_; in ~hold_ptr()
42 T const *get() const { return ptr_; } in get()
46 T *get() { return ptr_; } in get()
51 T const &operator *() const { return *ptr_; } in operator *()
55 T &operator *() { return *ptr_; } in operator *()
59 T const *operator->() const { return ptr_; } in operator ->()
63 T *operator->() { return ptr_; } in operator ->()
68 T *release() { T *tmp=ptr_; ptr_=0; return tmp; } in release()
[all …]
/third_party/boost/boost/spirit/home/support/detail/lexer/
Dinput.hpp166 const std::size_t *ptr_ = dfa_ + dfa_alphabet_; in next() local
168 bool end_state_ = *ptr_ != 0; in next()
169 std::size_t id_ = *(ptr_ + id_index); in next()
170 std::size_t uid_ = *(ptr_ + unique_id_index); in next()
177 const std::size_t BOL_state_ = ptr_[bol_index]; in next()
178 const std::size_t EOL_state_ = ptr_[eol_index]; in next()
182 ptr_ = &dfa_[BOL_state_ * dfa_alphabet_]; in next()
186 ptr_ = &dfa_[EOL_state_ * dfa_alphabet_]; in next()
195 ptr_[lookup_[static_cast<typename Traits::index_type> in next()
203 ptr_ = &dfa_[state_ * dfa_alphabet_]; in next()
[all …]
Dfile_input.hpp210 const std::size_t *ptr_ = dfa_ + dfa_alphabet_; in next() local
212 bool end_state_ = *ptr_ != 0; in next()
213 std::size_t id_ = *(ptr_ + id_index); in next()
214 std::size_t uid_ = *(ptr_ + unique_id_index); in next()
228 const std::size_t BOL_state_ = ptr_[bol_index]; in next()
229 const std::size_t EOL_state_ = ptr_[eol_index]; in next()
234 ptr_ = &dfa_[BOL_state_ * dfa_alphabet_]; in next()
238 ptr_ = &dfa_[EOL_state_ * dfa_alphabet_]; in next()
243 ptr_[lookup_[static_cast<typename Traits::index_type> in next()
251 ptr_ = &dfa_[state_ * dfa_alphabet_]; in next()
[all …]
/third_party/boost/boost/optional/detail/
Doptional_reference_spec.hpp116 T* ptr_; member in boost::optional
126 optional() BOOST_NOEXCEPT : ptr_() {} in optional()
127 optional(none_t) BOOST_NOEXCEPT : ptr_() {} in optional()
130 explicit optional(const optional<U&>& rhs) BOOST_NOEXCEPT : ptr_(rhs.get_ptr()) {} in optional()
131 optional(const optional& rhs) BOOST_NOEXCEPT : ptr_(rhs.get_ptr()) {} in optional()
136 : ptr_(boost::addressof(rhs)) {} in optional()
140 : ptr_(boost::addressof(rhs)) {} in optional()
142 optional& operator=(const optional& rhs) BOOST_NOEXCEPT { ptr_ = rhs.get_ptr(); return *this; } in operator =()
144 …optional& operator=(const optional<U&>& rhs) BOOST_NOEXCEPT { ptr_ = rhs.get_ptr(); return *this; } in operator =()
145 optional& operator=(none_t) BOOST_NOEXCEPT { ptr_ = 0; return *this; } in operator =()
[all …]
/third_party/boost/boost/spirit/home/lex/lexer/lexertl/
Diterator_tokenizer.hpp51 std::size_t const* ptr_ = dfa_ + dfa_alphabet_; in next() local
53 bool end_state_ = *ptr_ != 0; in next()
54 std::size_t id_ = *(ptr_ + boost::lexer::id_index); in next()
55 std::size_t uid_ = *(ptr_ + boost::lexer::unique_id_index); in next()
62 std::size_t const BOL_state_ = ptr_[boost::lexer::bol_index]; in next()
63 std::size_t const EOL_state_ = ptr_[boost::lexer::eol_index]; in next()
67 ptr_ = &dfa_[BOL_state_ * dfa_alphabet_]; in next()
71 ptr_ = &dfa_[EOL_state_ * dfa_alphabet_]; in next()
85 std::size_t const state_ = ptr_[ in next()
93 ptr_ = &dfa_[state_ * dfa_alphabet_]; in next()
[all …]
/third_party/protobuf/src/google/protobuf/stubs/
Dstringpiece.cc53 : ptr_(x.ptr_ + pos), length_(x.length_ - pos) { in StringPiece()
61 : ptr_(x.ptr_ + pos), length_(std::min(len, x.length_ - pos)) { in StringPiece()
68 target->assign(ptr_, length_); in CopyToString()
72 target->append(ptr_, length_); in AppendToString()
77 ptr_ += x.length_; in Consume()
96 memcpy(buf, ptr_ + pos, ret); in copy()
109 const char *result = std::search(ptr_ + pos, ptr_ + length_, in find()
110 s.ptr_, s.ptr_ + s.length_); in find()
111 return result == ptr_ + length_ ? npos : result - ptr_; in find()
119 memchr(ptr_ + pos, c, length_ - pos)); in find()
[all …]
/third_party/mindspore/mindspore/ccsrc/runtime/device/cpu/
Dcpu_device_address.cc31 if (ptr_ == nullptr) { in ClearDeviceMemory()
35 CPUMemoryPool::GetInstance().FreeTensorMem(ptr_); in ClearDeviceMemory()
36 ptr_ = nullptr; in ClearDeviceMemory()
50 ret = DumpJsonParser::DumpToFile(path, ptr_, size_, host_shape, host_type); in DumpMemToFile()
61 if (ptr_ == nullptr) { in SyncDeviceToHost()
65 if (host_ptr == ptr_) { in SyncDeviceToHost()
75 auto ret_code = memcpy_s(host_ptr, size, ptr_, size); in SyncDeviceToHost()
78 ConvertSameType(host_ptr, ptr_, size, type); in SyncDeviceToHost()
86 FloatToHalf(host_ptr, ptr_, size >> 1); in SyncDeviceToHost()
88 FloatToDouble(host_ptr, ptr_, size / sizeof(double)); in SyncDeviceToHost()
[all …]
/third_party/boost/libs/intrusive/test/
Dpointer_traits_test.cpp56 : ptr_(0) in CompleteSmartPtr()
60 : ptr_(&p) in CompleteSmartPtr()
64 { this->ptr_ = c.ptr_; } in CompleteSmartPtr()
67 { this->ptr_ = c.ptr_; } in operator =()
73 { return ptr_; } in operator ->()
76 { return *ptr_; } in operator *()
79 { return ptr_? &CompleteSmartPtr::unspecified_bool_type_func : 0; } in operator unspecified_bool_type()
85 element_type* const p = static_cast<element_type*>(uptr.ptr_); in static_cast_from()
93 element_type* const p = const_cast<element_type*>(uptr.ptr_); in const_cast_from()
101 element_type* const p = dynamic_cast<element_type*>(uptr.ptr_); in dynamic_cast_from()
[all …]
/third_party/boost/boost/contract/detail/
Dauto_ptr.hpp21 explicit auto_ptr(T* ptr = 0) : ptr_(ptr) {} in auto_ptr()
23 ~auto_ptr() BOOST_NOEXCEPT_IF(false) { delete ptr_; } in BOOST_NOEXCEPT_IF()
26 T* ptr = ptr_; in release()
27 ptr_ = 0; in release()
32 BOOST_CONTRACT_DETAIL_DEBUG(ptr_); in operator *()
33 return *ptr_; in operator *()
37 BOOST_CONTRACT_DETAIL_DEBUG(ptr_); in operator *()
38 return *ptr_; in operator *()
41 T* operator->() { return ptr_; } in operator ->()
42 T const* operator->() const { return ptr_; } in operator ->()
[all …]
/third_party/protobuf/python/google/protobuf/pyext/
Dscoped_pyobject_ptr.h51 : ptr_(py_object) {} in ptr_() function
54 ~ScopedPythonPtr() { Py_XDECREF(ptr_); } in ~ScopedPythonPtr()
63 Py_XDECREF(ptr_);
64 ptr_ = p;
65 return ptr_;
71 PyObject* p = ptr_; in release()
72 ptr_ = NULL; in release()
76 PyObjectStruct* get() const { return ptr_; } in get()
78 PyObject* as_pyobject() const { return reinterpret_cast<PyObject*>(ptr_); } in as_pyobject()
82 void inc() const { Py_INCREF(ptr_); } in inc()
[all …]
/third_party/libphonenumber/cpp/src/phonenumbers/base/strings/
Dstring_piece.cc39 memcpy(buf, ptr_ + pos, ret); in copy()
47 const char* result = std::search(ptr_ + pos, ptr_ + length_, in find()
48 s.ptr_, s.ptr_ + s.length_); in find()
49 const size_type xpos = result - ptr_; in find()
57 const char* result = std::find(ptr_ + pos, ptr_ + length_, c); in find()
58 return result != ptr_ + length_ ? static_cast<size_t>(result - ptr_) : npos; in find()
68 const char* last = ptr_ + std::min(length_ - s.length_, pos) + s.length_; in rfind()
69 const char* result = std::find_end(ptr_, last, s.ptr_, s.ptr_ + s.length_); in rfind()
70 return result != last ? static_cast<size_t>(result - ptr_) : npos; in rfind()
78 if (ptr_[i] == c) in rfind()
[all …]
Dstring_piece.h49 StringPiece() : ptr_(NULL), length_(0) { } in StringPiece()
51 : ptr_(str), length_((str == NULL) ? 0 : strlen(str)) { } in StringPiece()
53 : ptr_(str.data()), length_(str.size()) { } in StringPiece()
55 : ptr_(offset), length_(len) { } in StringPiece()
61 const char* data() const { return ptr_; } in data()
67 ptr_ = NULL; in clear()
71 ptr_ = data; in set()
75 ptr_ = str; in set()
79 ptr_ = reinterpret_cast<const char*>(data); in set()
83 char operator[](size_type i) const { return ptr_[i]; }
[all …]
/third_party/boost/libs/asio/include/boost/asio/detail/
Dwin_iocp_overlapped_ptr.hpp43 : ptr_(0), in win_iocp_overlapped_ptr()
52 : ptr_(0), in win_iocp_overlapped_ptr()
67 if (ptr_) in reset()
69 ptr_->destroy(); in reset()
70 ptr_ = 0; in reset()
93 ptr_ = p.p; in reset()
101 return ptr_; in get()
107 return ptr_; in get()
113 if (ptr_) in release()
114 iocp_service_->on_pending(ptr_); in release()
[all …]
/third_party/boost/boost/asio/detail/
Dwin_iocp_overlapped_ptr.hpp43 : ptr_(0), in win_iocp_overlapped_ptr()
52 : ptr_(0), in win_iocp_overlapped_ptr()
67 if (ptr_) in reset()
69 ptr_->destroy(); in reset()
70 ptr_ = 0; in reset()
93 ptr_ = p.p; in reset()
101 return ptr_; in get()
107 return ptr_; in get()
113 if (ptr_) in release()
114 iocp_service_->on_pending(ptr_); in release()
[all …]
/third_party/boost/libs/unordered/test/helpers/
Dlist.hpp91 node* ptr_; member in test::test_detail::list_iterator
100 list_iterator() : ptr_(0) {} in list_iterator()
101 explicit list_iterator(node* x) : ptr_(x) {} in list_iterator()
103 T& operator*() const { return ptr_->value_; } in operator *()
104 T* operator->() const { return &ptr_->value_; } in operator ->()
107 ptr_ = ptr_->next_; in operator ++()
113 ptr_ = ptr_->next_; in operator ++()
116 bool operator==(const_iterator y) const { return ptr_ == y.ptr_; } in operator ==()
117 bool operator!=(const_iterator y) const { return ptr_ != y.ptr_; } in operator !=()
128 node* ptr_; member in test::test_detail::list_const_iterator
[all …]
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/util/
Dslice.h37 ReadableSlice() : ptr_(nullptr), sz_(0) {} in ReadableSlice()
38 ReadableSlice(const void *ptr, size_t sz) : ptr_(ptr), sz_(sz) {} in ReadableSlice()
44 ptr_ = static_cast<const char *>(src.GetPointer()) + offset; in ReadableSlice()
49 ptr_ = lhs.ptr_; in ReadableSlice()
54 ptr_ = lhs.ptr_;
61 ptr_ = lhs.ptr_; in ReadableSlice()
63 lhs.ptr_ = nullptr; in ReadableSlice()
69 ptr_ = lhs.ptr_;
71 lhs.ptr_ = nullptr;
78 const void *GetPointer() const { return ptr_; } in GetPointer()
[all …]
/third_party/cef/include/base/
Dcef_scoped_refptr.h224 scoped_refptr(T* p) : ptr_(p) { in scoped_refptr()
225 if (ptr_) in scoped_refptr()
226 AddRef(ptr_); in scoped_refptr()
231 scoped_refptr(const scoped_refptr& r) : scoped_refptr(r.ptr_) {} in scoped_refptr()
237 scoped_refptr(const scoped_refptr<U>& r) : scoped_refptr(r.ptr_) {} in scoped_refptr()
241 scoped_refptr(scoped_refptr&& r) noexcept : ptr_(r.ptr_) { r.ptr_ = nullptr; } in scoped_refptr()
247 scoped_refptr(scoped_refptr<U>&& r) noexcept : ptr_(r.ptr_) { in scoped_refptr()
248 r.ptr_ = nullptr; in scoped_refptr()
257 if (ptr_) in ~scoped_refptr()
258 Release(ptr_); in ~scoped_refptr()
[all …]
/third_party/boost/boost/iostreams/detail/
Dcounted_array.hpp26 : buf_(buf), ptr_(0), end_(size) in counted_array_source()
31 streamsize result = (std::min)(n, end_ - ptr_); in read()
34 buf_ + ptr_, in read()
37 ptr_ += result; in read()
40 std::streamsize count() const { return ptr_; } in count()
43 std::streamsize ptr_, end_; member in boost::iostreams::detail::counted_array_source
52 : buf_(buf), ptr_(0), end_(size) in counted_array_sink()
57 std::streamsize result = (std::min)(n, end_ - ptr_); in write()
59 buf_ + ptr_, in write()
63 ptr_ += result; in write()
[all …]
/third_party/gn/src/base/memory/
Dscoped_refptr.h173 constexpr scoped_refptr(T* p) : ptr_(p) { in scoped_refptr()
174 if (ptr_) in scoped_refptr()
175 AddRef(ptr_); in scoped_refptr()
180 scoped_refptr(const scoped_refptr& r) : scoped_refptr(r.ptr_) {} in scoped_refptr()
186 scoped_refptr(const scoped_refptr<U>& r) : scoped_refptr(r.ptr_) {} in scoped_refptr()
190 scoped_refptr(scoped_refptr&& r) noexcept : ptr_(r.ptr_) { r.ptr_ = nullptr; } in scoped_refptr()
196 scoped_refptr(scoped_refptr<U>&& r) noexcept : ptr_(r.ptr_) { in scoped_refptr()
197 r.ptr_ = nullptr; in scoped_refptr()
206 if (ptr_) in ~scoped_refptr()
207 Release(ptr_); in ~scoped_refptr()
[all …]
/third_party/grpc/third_party/upb/upb/pb/
Ddecoder.h60 DecoderMethodPtr() : ptr_(nullptr) {} in DecoderMethodPtr()
61 DecoderMethodPtr(const upb_pbdecodermethod* ptr) : ptr_(ptr) {} in DecoderMethodPtr()
63 const upb_pbdecodermethod* ptr() { return ptr_; } in ptr()
69 return upb_pbdecodermethod_desthandlers(ptr_); in dest_handlers()
74 return upb_pbdecodermethod_inputhandler(ptr_); in input_handler()
79 return upb_pbdecodermethod_isnative(ptr_); in is_native()
83 const upb_pbdecodermethod* ptr_;
120 DecoderPtr() : ptr_(nullptr) {} in DecoderPtr()
121 DecoderPtr(upb_pbdecoder* ptr) : ptr_(ptr) {} in DecoderPtr()
123 upb_pbdecoder* ptr() { return ptr_; } in ptr()
[all …]

1234567