| /developtools/profiler/device/plugins/ftrace_plugin/include/ |
| D | ftrace_field_parser.h | 26 …template <typename T> static T ParseIntField(const FieldFormat& format, uint8_t data[], size_t siz… in ParseIntField() 28 static_assert(std::is_integral<T>::value, "Integral type T required."); in ParseIntField() 29 T retval = {}; in ParseIntField() 36 …template <typename T> static std::vector<T> ParseVectorIntField(const std::vector<FieldFormat>& fi… in ParseVectorIntField() 39 static_assert(std::is_integral<T>::value, "Integral type T required."); in ParseVectorIntField() 45 std::vector<T> retvalVec = {}; in ParseVectorIntField() 51 T retval = {}; in ParseVectorIntField() 58 template <typename T> 59 …static T ParseIntField(const std::vector<FieldFormat>& fields, size_t id, uint8_t data[], size_t s… in ParseIntField() 61 static_assert(std::is_integral<T>::value, "Integral type T required."); in ParseIntField() [all …]
|
| /developtools/hiperf/test/unittest/common/native/include/ |
| D | report_test.h | 29 template<class T> 30 void CompareNumberTest(T &lowValue, T &midValue, T &highValue, in CompareNumberTest() 40 template<class T> 41 void CompareStringTest(T &lowValue, T &midValue, T &highValue, in CompareStringTest()
|
| D | callstack_test.h | 159 template<class T> 160 void LoadFromFile(const std::string &fileName, std::vector<T> &data) in LoadFromFile() 171 ASSERT_EQ(sb.st_size % sizeof(T), 0u); in LoadFromFile() 172 data.resize(sb.st_size / sizeof(T)); in LoadFromFile() 173 ASSERT_EQ(fread(data.data(), sizeof(T), data.size(), fp.get()), data.size()); in LoadFromFile()
|
| /developtools/profiler/proto_encoder/include/ |
| D | base_message.h | 112 template<typename T> 113 void AddFixed32(uint32_t fieldId, T v) in AddFixed32() 115 static_assert(sizeof(T) == SIZE_FIXED32, "AddFixed32: T is not 32 bits"); in AddFixed32() 145 template<typename T> 146 void AddFixed64(uint32_t fieldId, T v) in AddFixed64() 148 static_assert(sizeof(T) == SIZE_FIXED64, "AddFixed64: T is not 64 bits"); in AddFixed64() 178 template<typename T> 179 void AddVarint(uint32_t fieldId, T v) in AddVarint() 205 template<typename T> 206 void AddZigZagVarint(uint32_t fieldId, T v) in AddZigZagVarint() [all …]
|
| D | varint_encode.h | 67 template<typename T> 68 inline typename std::make_unsigned<T>::type EncodeZigZag(T v) in EncodeZigZag() 71 return ((typename std::make_unsigned<T>::type)(v) << 1); in EncodeZigZag() 74 return ((typename std::make_unsigned<T>::type)(~v) << 1) + 1; in EncodeZigZag() 77 template<typename T> 78 inline uint32_t EncodeVarint(uint8_t* buf, T v) in EncodeVarint() 95 template<typename T> 96 inline uint32_t EncodeZigZagVarint(uint8_t* buf, T v) in EncodeZigZagVarint() 101 template<typename T> 102 inline void EncodeVarintPadding(uint8_t* buf, T v, uint32_t paddingSize) in EncodeVarintPadding()
|
| /developtools/profiler/host/smartperf/ide/src/trace/component/trace/base/ |
| D | TraceRowObject.ts | 19 export class TraceRowObject<T extends BaseStruct> { 31 public dataList: Array<T> | undefined; 32 public dataListCache: Array<T> = []; 35 public supplier: (() => Promise<Array<T>>) | undefined | null; 38 row: TraceRow<T>, 63 public preObject: TraceRowObject<T> | undefined | null; 64 public nextObject: TraceRowObject<T> | undefined | null;
|
| /developtools/smartperf_host/ide/src/trace/component/trace/base/ |
| D | TraceRowObject.ts | 19 export class TraceRowObject<T extends BaseStruct> { 31 public dataList: Array<T> | undefined; 32 public dataListCache: Array<T> = []; 35 public supplier: (() => Promise<Array<T>>) | undefined | null; 37 row: TraceRow<T>, 45 public preObject: TraceRowObject<T> | undefined | null; 46 public nextObject: TraceRowObject<T> | undefined | null;
|
| /developtools/global_resource_tool/include/ |
| D | singleton.h | 24 template<typename T> 27 static T &GetInstance() in GetInstance() 33 static T instance_; 36 template<typename T> 37 T Singleton<T>::instance_;
|
| D | cmd_parser.h | 105 template<class T> 106 class CmdParser : public Singleton<CmdParser<T>> { 108 T &GetCmdParser(); 113 T cmdParser_; 116 template<class T> 117 void CmdParser<T>::ShowUseage() in ShowUseage() 145 template<class T> 146 T &CmdParser<T>::GetCmdParser() in GetCmdParser() 151 template<class T> 152 uint32_t CmdParser<T>::Parse(int argc, char *argv[]) in Parse()
|
| /developtools/smartperf_host/trace_streamer/src/base/ |
| D | string_to_numerical.h | 50 template <typename T> 51 std::optional<T> StrToInt(const std::string& str, int32_t base = INTEGER_RADIX_TYPE_DEC) 55 T value; 56 if constexpr (std::is_same_v<T, uint32_t>) { 57 value = static_cast<T>(std::strtoul(str.c_str(), &endPtr, base)); 58 } else if constexpr (std::is_same_v<T, int32_t>) { 59 value = static_cast<T>(std::strtol(str.c_str(), &endPtr, base)); 60 } else if constexpr (std::is_same_v<T, uint64_t>) { 61 value = static_cast<T>(std::strtoull(str.c_str(), &endPtr, base)); 62 } else if constexpr (std::is_same_v<T, int64_t>) { [all …]
|
| D | index_map.h | 41 template <class T> 42 void ProcessData(const std::deque<T>& dataQueue, in ProcessData() 68 template <class T> 69 void MixRange(unsigned char op, T value, const std::deque<T>& dataQueue) in MixRange() 72 auto invalidValue = std::numeric_limits<T>::max(); in MixRange() 186 template <typename T> 187 void RemoveNullElements(const std::deque<T>& rows, T v) in RemoveNullElements() 189 auto invalidValue = std::numeric_limits<T>::max(); in RemoveNullElements()
|
| /developtools/profiler/host/smartperf/trace_streamer/src/base/ |
| D | string_to_numerical.h | 50 template <typename T> 51 inline std::optional<T> StrToInt(const std::string& str, int32_t base = INTEGER_RADIX_TYPE_DEC) 55 T value; 56 if constexpr (std::is_same_v<T, uint32_t>) { 57 value = static_cast<T>(std::strtoul(str.c_str(), &endPtr, base)); 58 } else if constexpr (std::is_same_v<T, int32_t>) { 59 value = static_cast<T>(std::strtol(str.c_str(), &endPtr, base)); 60 } else if constexpr (std::is_same_v<T, uint64_t>) { 61 value = static_cast<T>(std::strtoull(str.c_str(), &endPtr, base)); 62 } else if constexpr (std::is_same_v<T, int64_t>) { [all …]
|
| /developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/utils/ |
| D | JArrayList.ets | 22 export class JArrayList<T> implements JList<T> { 24 dataSouce:Array<T>; 38 append(element:T) { 42 add(element:T) { 47 addAll(newArray:JList<T>) { 59 insert(element:T) { 68 remove(element:T) { 82 contains(element:T) { 85 indexOf(element:T):number { 148 at(pos:number):T { [all …]
|
| /developtools/smartperf_host/ide/src/hdc/hdcclient/ |
| D | AsyncQueue.ts | 18 export class DataMessageQueue<T> { 19 private eleArray: Array<T>; 22 this.eleArray = new Array<T>(); 25 public push(entry: T): boolean { 33 public pop(): T | undefined { 46 export class AsyncQueue<T> {
|
| /developtools/profiler/host/smartperf/ide/src/hdc/hdcclient/ |
| D | AsyncQueue.ts | 18 export class DataMessageQueue<T> { 19 private eleArray: Array<T>; 22 this.eleArray = new Array<T>(); 25 public push(entry: T): boolean { 33 public pop(): T | undefined { 46 export class AsyncQueue<T> {
|
| /developtools/hdc/src/common/ |
| D | serial_struct_define.h | 34 template<class T, class U> struct MemPtr<U T::*> { 35 using type = T; 130 template<class T> struct Descriptor { 131 static_assert(sizeof(T) == 0, "You need to implement descriptor for your own types"); 159 template<class T> const auto &MessageType() 161 static const auto message = Descriptor<T>::type(); 165 template<class T, class Enable = void> struct Serializer; 176 template<class T, class V, class F, class W, class Enable = void> 180 template<class T, class V, class F, class W> 181 struct HasSerializePacked<T, V, F, W, [all …]
|
| D | base.h | 86 template<class T> int ZeroStruct(T &structBuf) in ZeroStruct() 88 return memset_s(&structBuf, sizeof(T), 0, sizeof(T)); in ZeroStruct() 91 template<class T, size_t N> int ZeroArray(T (&arrayBuf)[N]) in ZeroArray() 93 return memset_s(arrayBuf, sizeof(T) * N, 0, sizeof(T) * N); in ZeroArray() 96 template<class T> int ZeroBuf(T &arrayBuf, int size) in ZeroBuf()
|
| /developtools/smartperf_host/ide/src/trace/component/trace/sheet/ |
| D | SheetUtils.ts | 73 export function compare<T extends CompareStruct>(base: T[], target: T[]): T[] { 74 const diffMap = new Map<string, T>(); 77 diffMap.set(item.key, item.clone(true) as T); 85 diffMap.set(item.key, item.clone() as T);
|
| /developtools/profiler/device/plugins/native_daemon/include/ |
| D | dwarf_encoding.h | 87 template<class T> 88 uint64_t dwReadAnyTypeData(const unsigned char *&buffer, T) in dwReadAnyTypeData() argument 90 T value; in dwReadAnyTypeData() 91 if (memcpy_s(&value, sizeof(T), buffer, sizeof(T)) != EOK) { in dwReadAnyTypeData() 94 buffer += sizeof(T); in dwReadAnyTypeData()
|
| D | utilities.h | 120 template<class T> 121 std::string VectorToString(const std::vector<T> &items) in VectorToString() 123 if constexpr (std::is_same<T, std::vector<std::string>>::value) { in VectorToString() 135 if constexpr (std::is_same<T, std::string>::value) { in VectorToString() 224 template<class T> 225 std::string ToHex(const T &source, int size = sizeof(T), bool perfix = false) 236 template<class S, class T> 237 size_t inline CopyFromBufferAndMove(S *&buffer, T *dest, size_t size = 0) 240 size = sizeof(T); 277 template<class T> [all …]
|
| /developtools/hiperf/include/ |
| D | dwarf_encoding.h | 87 template<class T> 88 uint64_t dwReadAnyTypeData(const unsigned char *&buffer, T) in dwReadAnyTypeData() argument 90 T value; in dwReadAnyTypeData() 91 if (memcpy_s(&value, sizeof(T), buffer, sizeof(T)) != 0) { in dwReadAnyTypeData() 94 buffer += sizeof(T); in dwReadAnyTypeData()
|
| D | report_json_file.h | 37 template<class T> 38 void OutputJsonKey(FILE *output, const T &value) in OutputJsonKey() 40 if constexpr (std::is_same<T, std::string>::value) { in OutputJsonKey() 46 } else if constexpr (std::is_same<T, std::string_view>::value) { in OutputJsonKey() 52 } else if constexpr (std::is_same<typename std::decay<T>::type, char *>::value) { in OutputJsonKey() 62 template<class T> 63 void OutputJsonValue(FILE *output, const T &value, bool first = true) 68 if constexpr (std::is_same<T, std::string>::value) { 70 } else if constexpr (std::is_same<T, std::string_view>::value) { 72 } else if constexpr (std::is_same<T, int>::value) { [all …]
|
| D | utilities.h | 136 template<class T> 137 std::string VectorToString(const std::vector<T> &items) in VectorToString() 139 if constexpr (std::is_same<T, std::vector<std::string>>::value) { in VectorToString() 151 if constexpr (std::is_same<T, std::string>::value) { in VectorToString() 246 template<class T> 247 std::string ToHex(const T &source, int size = sizeof(T), bool prefix = false) 258 template<class S, class T> 259 size_t inline CopyFromBufferAndMove(S *&buffer, T *dest, size_t size = 0) 262 size = sizeof(T); 299 template<class T> [all …]
|
| /developtools/profiler/host/smartperf/client/client_ui/entry/src/main/ets/common/ui/detail/chart/data/ |
| D | DataSet.ets | 27 export abstract class DataSet<T extends EntryOhos> extends BaseDataSet<T> { 32 protected mEntries:JArrayList<T>; 63 constructor(entries : JArrayList<T>, label : string) { 68 this.mEntries = new JArrayList<T>(); 86 public myCalcMinMax(e ?: T) : void { 112 protected calcMinMaxX(e : T) : void { 121 protected myCalcMinMaxY(e : T) : void { 140 public getValues() : JArrayList<T> { 149 public getEntries() : JArrayList<T> { 160 public setValues(values : JArrayList<T>) : void { [all …]
|
| /developtools/profiler/device/plugins/native_daemon/test/unittest/common/native/include/ |
| D | callstack_test.h | 112 template<class T> 113 void LoadFromFile(const std::string &fileName, std::vector<T> &data) in LoadFromFile() 128 ASSERT_EQ(sb.st_size % sizeof(T), 0u); in LoadFromFile() 129 data.resize(sb.st_size / sizeof(T)); in LoadFromFile() 131 if ((ret = fread(data.data(), sizeof(T), data.size(), fp.get())) < 0) { in LoadFromFile()
|