/system/bt/osi/src/ |
H A D | array.cc | 21 #include "osi/include/array.h" 38 static bool grow(array_t* array); 45 array_t* array = static_cast<array_t*>( local 48 array->element_size = element_size; 49 array->capacity = INTERNAL_ELEMENTS; 50 array->data = array->internal_storage; 51 return array; 54 void array_free(array_t* array) { argument 55 if (!array) retur 62 array_ptr(const array_t* array) argument 64 array_at(const array_t* array, size_t index) argument 70 array_length(const array_t* array) argument 75 array_append_value(array_t* array, uint32_t value) argument 79 array_append_ptr(array_t* array, void* data) argument 96 grow(array_t* array) argument [all...] |
/system/chre/util/include/chre/util/ |
H A D | macros.h | 21 * Obtains the number of elements in a C-style array. 23 #define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
/system/bt/osi/test/ |
H A D | array_test.cc | 5 #include "osi/include/array.h" 10 array_t* array = array_new(4); local 11 ASSERT_TRUE(array != NULL); 12 array_free(array); 18 array_t* array = array_new(4); local 19 EXPECT_DEATH(array_ptr(array), ""); 20 array_free(array); 24 array_t* array = array_new(4); local 25 EXPECT_DEATH(array_at(array, 1), ""); 26 array_free(array); 30 array_t* array = array_new(sizeof(int)); local 42 array_t* array = array_new(sizeof(int)); local 59 array_t* array = array_new(128); local [all...] |
/system/bt/osi/include/ |
H A D | array.h | 27 // Returns a new array object that stores elements of size |element_size|. The 32 // Frees an array that was allocated with |array_new|. |array| may be NULL. 33 void array_free(array_t* array); 35 // Returns a pointer to the first stored element in |array|. |array| must not be 37 void* array_ptr(const array_t* array); 39 // Returns a pointer to the |index|th element of |array|. |index| must be less 40 // than the array's length. |array| mus [all...] |
/system/libvintf/include/vintf/ |
H A D | HalFormat.h | 23 #include <array> 33 static const std::array<std::string, 2> gHalFormatStrings = {
|
H A D | SchemaType.h | 22 #include <array> 32 static const std::array<std::string, 2> gSchemaTypeStrings = {
|
H A D | KernelConfigType.h | 22 #include <array> 34 static const std::array<std::string, 4> gKernelConfigTypeStrings = {
|
H A D | Transport.h | 23 #include <array> 34 static const std::array<std::string, 3> gTransportStrings = {
|
H A D | Tristate.h | 22 #include <array> 33 static const std::array<std::string, 3> gTristateStrings = {
|
H A D | Arch.h | 23 #include <array> 35 static const std::array<std::string, 4> gArchStrings = {
|
/system/chre/util/tests/ |
H A D | heap_test.cc | 5 #include <array> 28 std::array<int, MaxSize> array; local 29 std::array<int, MaxSize> array_sorted; 32 array[i] = std::rand(); 33 array_sorted[i] = array[i]; 36 // make sure the popped data is in the right order of various array sizes. 39 v.push_back(array[i]); 68 std::array<int, MaxSize> array; local [all...] |
/system/connectivity/wifilogd/ |
H A D | byte_buffer.h | 20 #include <array> 62 std::array<uint8_t, SizeBytes> raw_buffer_;
|
H A D | main_loop.cpp | 17 #include <array> 52 std::array<uint8_t, protocol::kMaxMessageSize> input_buf;
|
/system/bt/service/common/bluetooth/ |
H A D | uuid.h | 19 #include <array> 34 typedef std::array<uint8_t, kNumBytes16> UUID16Bit; 35 typedef std::array<uint8_t, kNumBytes32> UUID32Bit; 36 typedef std::array<uint8_t, kNumBytes128> UUID128Bit; 57 // std::array variants constructors.
|
/system/extras/perfprofd/quipper/base/ |
H A D | macros.h | 49 // The arraysize(arr) macro returns the # of elements in an array arr. 54 // One caveat is that arraysize() doesn't accept any array of an 64 char (&ArraySizeHelper(T (&array)[N]))[N]; 71 char (&ArraySizeHelper(const T (&array)[N]))[N]; 74 #define arraysize(array) (sizeof(ArraySizeHelper(array))) 96 // the array) and sizeof(*(arr)) (the # of bytes in one array 98 // indeed an array, in which case the division result is the # of 99 // elements in the array [all...] |
/system/extras/simpleperf/ |
H A D | perf_clock.cpp | 58 TryMmap array[TRY_MMAP_COUNT]; local 63 array[i].start_system_time_in_ns = GetSystemClock(); 64 array[i].mmap_start_addr = 66 if (array[i].mmap_start_addr == MAP_FAILED) { 72 array[i].end_system_time_in_ns = GetSystemClock(); 78 array[i].end_system_time_in_ns - array[i].start_system_time_in_ns; 83 munmap(array[i].mmap_start_addr, 4096); 86 reinterpret_cast<uint64_t>(array[best_index].mmap_start_addr); 89 thread_arg->system_time_in_ns = array[best_inde [all...] |
/system/connectivity/wifilogd/tests/ |
H A D | memory_reader_unittest.cpp | 17 #include <array> 31 constexpr std::array<uint8_t, 1> buffer{}; 37 constexpr std::array<uint8_t, 0> buffer{}; 48 constexpr std::array<uint8_t, 3> buffer{{1, 2, 3}}; 62 constexpr std::array<uint8_t, 3> buffer{{1, 2, 3}}; 110 constexpr std::array<uint8_t, 1024> buffer{}; 116 constexpr std::array<uint8_t, 1024> buffer{}; 122 constexpr std::array<uint8_t, 1024> buffer{}; 131 constexpr std::array<uint8_t, 1> buffer{}; 137 constexpr std::array<uint8_ [all...] |
H A D | os_unittest.cpp | 17 #include <array> 195 std::array<uint8_t, 8192> buffer{}; 208 std::array<uint8_t, kReadBufferSize> buffer{}; 221 std::array<uint8_t, kReadBufferSize> buffer{}; 232 std::array<uint8_t, 8192> buffer{}; 244 std::array<uint8_t, 8192> buffer{}; 255 constexpr std::array<uint8_t, 8192> buffer{}; 266 constexpr std::array<uint8_t, 8192> buffer{}; 276 constexpr std::array<uint8_t, 0> buffer{}; 286 constexpr std::array<uint8_ [all...] |
/system/libhidl/ |
H A D | test_main.cpp | 179 int32_t array[] = {5, 6, 7}; 180 vector<int32_t> v(array, array + 3); 183 EXPECT_ARRAYEQ(hv1, array, 3); 193 EXPECT_ARRAYEQ(v3, array, v3.size()); 197 int32_t array[] = {5, 6, 7}; local 198 android::hardware::hidl_vec<int32_t> hv1 = std::vector<int32_t>(array, array + 3); 235 int32_t array[] = {5, 6, 7}; 236 hidl_vec<int32_t> hv1 = std::vector<int32_t>(array, arra [all...] |
/system/tools/aidl/tests/ |
H A D | aidl_test_client_file_descriptors.cpp | 142 vector<unique_fd> array; local 143 array.resize(2); 145 if (!DoPipe(&array[0], &array[1])) { 152 status = s->ReverseFileDescriptorArray(array, &repeated, &reversed); 155 cerr << "Could not reverse file descriptor array." << endl; 160 DoWrite(FdByName(array[1]), "First") &&
|
/system/core/base/include/android-base/ |
H A D | macros.h | 58 // The arraysize(arr) macro returns the # of elements in an array arr. 63 // One caveat is that arraysize() doesn't accept any array of an 73 char(&ArraySizeHelper(T(&array)[N]))[N]; // NOLINT(readability/casting) 75 #define arraysize(array) (sizeof(ArraySizeHelper(array))) 97 // the array) and sizeof(*(arr)) (the # of bytes in one array 99 // indeed an array, in which case the division result is the # of 100 // elements in the array. Otherwise, arr cannot possibly be an array, [all...] |
/system/core/libutils/ |
H A D | VectorImpl.cpp | 126 ssize_t VectorImpl::insertArrayAt(const void* array, size_t index, size_t length) argument 132 _do_copy(where, array, length); 137 ssize_t VectorImpl::appendArray(const void* array, size_t length) argument 139 return insertArrayAt(array, size(), length); 179 void* array = const_cast<void*>(arrayImpl()); local 183 void* item = reinterpret_cast<char*>(array) + mItemSize*(i); 184 void* curr = reinterpret_cast<char*>(array) + mItemSize*(i-1); 188 // we're going to have to modify the array... 189 array = editArrayImpl(); 190 if (!array) retur [all...] |
/system/extras/perfprofd/quipper/ |
H A D | perf_reader.cc | 250 const uint64_t* ReadReadInfo(const uint64_t* array, argument 255 sample->read.time_enabled = *array++; 257 sample->read.time_running = *array++; 259 sample->read.one.id = *array++; 267 return array; 272 const uint64_t* ReadCallchain(const uint64_t* array, argument 280 uint64_t callchain_size = *array++; 287 callchain->ips[i] = *array++; 293 return array; 298 const uint64_t* ReadRawData(const uint64_t* array, argument 321 ReadBranchStack(const uint64_t* array, bool swap_bytes, struct perf_sample* sample) argument 351 ReadPerfSampleFromData(const perf_event_type event_type, const uint64_t* array, const uint64_t sample_fields, const uint64_t read_format, bool swap_bytes, const perf_event_attr &attr0, size_t n_attrs, struct perf_sample* sample) argument 510 WritePerfSampleToData(const perf_event_type event_type, const struct perf_sample& sample, const uint64_t sample_fields, const uint64_t read_format, uint64_t* array) argument [all...] |
H A D | perf_utils.cc | 43 string HexToString(const u8* array, size_t length) { argument 49 snprintf(buffer, sizeof(buffer), "%02x", array[i]); 55 bool StringToHex(const string& str, u8* array, size_t length) { argument 59 // Stop when there are no more characters, or the array has been filled. 64 array[i] = strtol(one_byte.c_str(), &err, kHexRadix); 120 offset = offsetof(event_t, sample.array);
|
/system/core/include/utils/ |
H A D | Vector.h | 102 * C-style array access 106 inline const TYPE* array() const; 122 * modifying the array 141 //! insert an array at a given index 142 ssize_t insertArrayAt(const TYPE* array, size_t index, size_t length); 144 //! append an array at the end of this vector 145 ssize_t appendArray(const TYPE* array, size_t length); 180 * sort (stable) the array 202 inline const_iterator begin() const { return array(); } 203 inline const_iterator end() const { return array() 276 const TYPE* Vector<TYPE>::array() const { function in class:android::Vector 325 insertArrayAt(const TYPE* array, size_t index, size_t length) argument 330 appendArray(const TYPE* array, size_t length) argument [all...] |