Searched refs:s (Results 1 – 25 of 1110) sorted by relevance
12345678910>>...45
34 void PacketDef::GenParserDefinition(std::ostream& s) const { in GenParserDefinition()35 s << "class " << name_ << "View"; in GenParserDefinition()37 s << " : public " << parent_->name_ << "View {"; in GenParserDefinition()39 s << " : public PacketView<" << (is_little_endian_ ? "" : "!") << "kLittleEndian> {"; in GenParserDefinition()41 s << " public:"; in GenParserDefinition()45 s << "static " << name_ << "View Create(" << parent_->name_ << "View parent)"; in GenParserDefinition()46 s << "{ return " << name_ << "View(std::move(parent)); }"; in GenParserDefinition()48 …s << "static " << name_ << "View Create(PacketView<" << (is_little_endian_ ? "" : "!") << "kLittle… in GenParserDefinition()49 s << "{ return " << name_ << "View(std::move(packet)); }"; in GenParserDefinition()52 GenTestingParserFromBytes(s); in GenParserDefinition()[all …]
38 void StructDef::GenSpecialize(std::ostream& s) const { in GenSpecialize()42 s << "static " << name_ << "* Specialize(" << parent_->name_ << "* parent) {"; in GenSpecialize()43 s << "ASSERT(" << name_ << "::IsInstance(*parent));"; in GenSpecialize()44 s << "return static_cast<" << name_ << "*>(parent);"; in GenSpecialize()45 s << "}"; in GenSpecialize()48 void StructDef::GenToString(std::ostream& s) const { in GenToString()49 s << "std::string ToString() {"; in GenToString()50 s << "std::stringstream ss;"; in GenToString()51 s << "ss << std::hex << std::showbase << \"" << name_ << " { \";"; in GenToString()54 s << "ss"; in GenToString()[all …]
263 void ParentDef::GenMembers(std::ostream& s) const { in GenMembers()266 if (field->GenBuilderMember(s)) { in GenMembers()267 s << "_{};"; in GenMembers()272 void ParentDef::GenSize(std::ostream& s) const { in GenSize()290 s << "protected:"; in GenSize()291 s << "size_t BitsOfHeader() const {"; in GenSize()292 s << "return 0"; in GenSize()296 s << " + " << parent_->name_ << "Builder::BitsOfHeader() "; in GenSize()298 s << " + " << parent_->name_ << "::BitsOfHeader() "; in GenSize()304 s << " + " << padded_size; in GenSize()[all …]
21 for (const auto& s : decls.type_defs_queue_) { in StructParserGenerator() local22 if (s.second->GetDefinitionType() == TypeDef::Type::STRUCT) { in StructParserGenerator()23 const auto* struct_def = static_cast<const StructDef*>(s.second); in StructParserGenerator()38 void StructParserGenerator::explore_children(const TreeNode& node, std::ostream& s) const { in explore_children()41 s << "bool " << field->GetName() << "_child_found = false; /* Greedy match */"; in explore_children()44 s << "if (!" << field->GetName() << "_child_found && "; in explore_children()45 s << child->struct_def_->name_ << "::IsInstance(*" << field->GetName() << "_value.get())) {"; in explore_children()46 s << field->GetName() << "_child_found = true;"; in explore_children()47 …s << "std::unique_ptr<" << child->struct_def_->name_ << "> " << child->packet_field_->GetName() <<… in explore_children()48 s << child->packet_field_->GetName() << "_value.reset(new "; in explore_children()[all …]
34 void GenParserDefinition(std::ostream& s) const;36 void GenTestingParserFromBytes(std::ostream& s) const;38 void GenParserDefinitionPybind11(std::ostream& s) const;40 void GenParserFieldGetter(std::ostream& s, const PacketField* field) const;42 void GenValidator(std::ostream& s) const;44 void GenParserToString(std::ostream& s) const;48 void GenBuilderDefinition(std::ostream& s) const;50 void GenBuilderDefinitionPybind11(std::ostream& s) const;52 void GenTestDefine(std::ostream& s) const;54 void GenFuzzTestDefine(std::ostream& s) const;[all …]
67 for (asocket* s : local_socket_list) { in find_local_socket()68 if (s->id != local_id) { in find_local_socket()71 if (peer_id == 0 || (s->peer && s->peer->id == peer_id)) { in find_local_socket()72 result = s; in find_local_socket()80 void install_local_socket(asocket* s) { in install_local_socket() argument83 s->id = local_socket_next_id++; in install_local_socket()90 local_socket_list.push_back(s); in install_local_socket()93 void remove_socket(asocket* s) { in remove_socket() argument96 list->erase(std::remove_if(list->begin(), list->end(), [s](asocket* x) { return x == s; }), in remove_socket()107 for (asocket* s : local_socket_list) { in close_all_sockets()[all …]
88 inline int db_MaxIndex2(double s[2]) in db_MaxIndex2()90 if(s[0]>=s[1]) return(0); in db_MaxIndex2()94 inline int db_MaxIndex3(const double s[3]) in db_MaxIndex3()99 best=s[0];pos=0; in db_MaxIndex3()100 if(s[1]>best){best=s[1];pos=1;} in db_MaxIndex3()101 if(s[2]>best){best=s[2];pos=2;} in db_MaxIndex3()105 inline int db_MaxIndex4(const double s[4]) in db_MaxIndex4()110 best=s[0];pos=0; in db_MaxIndex4()111 if(s[1]>best){best=s[1];pos=1;} in db_MaxIndex4()112 if(s[2]>best){best=s[2];pos=2;} in db_MaxIndex4()[all …]
110 void VectorField::GenExtractor(std::ostream& s, int num_leading_bits, bool for_struct) const { in GenExtractor() argument111 s << "auto " << element_field_->GetName() << "_it = " << GetName() << "_it;"; in GenExtractor()113 s << "size_t " << element_field_->GetName() << "_count = "; in GenExtractor()115 s << "to_fill->" << size_field_->GetName() << "_extracted_;"; in GenExtractor()117 s << "Get" << util::UnderscoreToCamelCase(size_field_->GetName()) << "();"; in GenExtractor()120 s << "while ("; in GenExtractor()122 s << "(" << element_field_->GetName() << "_count-- > 0) && "; in GenExtractor()125 … s << element_field_->GetName() << "_it.NumBytesRemaining() >= " << element_size_.bytes() << ") {"; in GenExtractor()127 s << element_field_->GetName() << "_it.NumBytesRemaining() > 0) {"; in GenExtractor()130 s << element_field_->GetDataType() << " " << element_field_->GetName() << "_ptr;"; in GenExtractor()[all …]
52 int ScalarField::GenBounds(std::ostream& s, Size start_offset, Size end_offset, Size size) const { in GenBounds() argument58 s << "auto " << GetName() << "_it = to_bound + (" << start_offset << ") / 8;"; in GenBounds()62 …s << "auto " << GetName() << "_it = to_bound + (to_bound.NumBytesRemaining() - (" << byte_offset <… in GenBounds()69 void ScalarField::GenExtractor(std::ostream& s, int num_leading_bits, bool) const { in GenExtractor() argument75 s << "auto extracted_value = " << GetName() << "_it.extract<" << extract_type << ">();"; in GenExtractor()79 s << "extracted_value >>= " << num_leading_bits << ";"; in GenExtractor()88 s << "extracted_value &= 0x" << std::hex << mask << std::dec << ";"; in GenExtractor()90 s << "*" << GetName() << "_ptr = static_cast<" << GetDataType() << ">(extracted_value);"; in GenExtractor()99 void ScalarField::GenGetter(std::ostream& s, Size start_offset, Size end_offset) const { in GenGetter() argument100 s << GetDataType() << " " << GetGetterFunctionName() << "() const {"; in GenGetter()[all …]
86 void ArrayField::GenExtractor(std::ostream& s, int num_leading_bits, bool for_struct) const { in GenExtractor() argument87 s << GetDataType() << "::iterator ret_it = " << GetName() << "_ptr->begin();"; in GenExtractor()88 s << "auto " << element_field_->GetName() << "_it = " << GetName() << "_it;"; in GenExtractor()90 …s << "while (" << element_field_->GetName() << "_it.NumBytesRemaining() >= " << element_size_.byte… in GenExtractor()91 s << " && ret_it < " << GetName() << "_ptr->end()) {"; in GenExtractor()93 s << "while (" << element_field_->GetName() << "_it.NumBytesRemaining() > 0 "; in GenExtractor()94 s << " && ret_it < " << GetName() << "_ptr->end()) {"; in GenExtractor()97 s << element_field_->GetDataType() << " " << element_field_->GetName() << "_ptr;"; in GenExtractor()99 s << "auto " << element_field_->GetName() << "_ptr = ret_it;"; in GenExtractor()101 element_field_->GenExtractor(s, num_leading_bits, for_struct); in GenExtractor()[all …]
65 void PayloadField::GenGetter(std::ostream& s, Size start_offset, Size end_offset) const { in GenGetter() argument66 s << "PacketView<kLittleEndian> " << GetGetterFunctionName() << "() const {"; in GenGetter()67 s << "ASSERT(was_validated_);"; in GenGetter()68 s << "size_t end_index = size();"; in GenGetter()69 s << "auto to_bound = begin();"; in GenGetter()70 GenBounds(s, start_offset, end_offset, GetSize()); in GenGetter()71 s << "return GetLittleEndianSubview(field_begin, field_end);"; in GenGetter()72 s << "}\n\n"; in GenGetter()74 s << "PacketView<!kLittleEndian> " << GetGetterFunctionName() << "BigEndian() const {"; in GenGetter()75 s << "ASSERT(was_validated_);"; in GenGetter()[all …]
42 void CustomField::GenExtractor(std::ostream& s, int, bool) const { in GenExtractor() argument43 s << "auto optional_it = "; in GenExtractor()44 s << GetDataType() << "::Parse( " << GetName() << "_ptr, " << GetName() << "_it);"; in GenExtractor()45 s << "if (optional_it) {"; in GenExtractor()46 s << GetName() << "_it = *optional_it;"; in GenExtractor()47 s << "} else {"; in GenExtractor()48 s << GetName() << "_it = " << GetName() << "_it + " << GetName() << "_it.NumBytesRemaining();"; in GenExtractor()49 s << GetName() << "_ptr = nullptr;"; in GenExtractor()50 s << "}"; in GenExtractor()59 void CustomField::GenGetter(std::ostream& s, Size start_offset, Size end_offset) const { in GenGetter() argument[all …]
43 int PacketField::GenBounds(std::ostream& s, Size start_offset, Size end_offset, Size size) const { in GenBounds() argument55 s << "size_t field_begin = (" << start_offset << ") / 8;"; in GenBounds()57 s << "size_t field_begin = end_index - (" << end_offset << " + " << size << ") / 8;"; in GenBounds()61 s << "size_t field_end = end_index - (" << end_offset << ") / 8;"; in GenBounds()64 s << "size_t field_sized_end = field_begin + (" << size << ") / 8;"; in GenBounds()65 s << "if (field_sized_end < field_end) { field_end = field_sized_end; }"; in GenBounds()68 s << "size_t field_end = field_begin + (" << size << ") / 8;"; in GenBounds()69 s << "if (field_end > end_index) { field_end = end_index; }"; in GenBounds()71 s << "auto " << name_ << "_it = to_bound.Subrange(field_begin, field_end - field_begin); "; in GenBounds()75 bool PacketField::GenBuilderParameter(std::ostream& s) const { in GenBuilderParameter()[all …]
42 void StructField::GenExtractor(std::ostream& s, int, bool) const { in GenExtractor() argument43 s << GetName() << "_it = "; in GenExtractor()44 s << GetDataType() << "::Parse(" << GetName() << "_ptr, " << GetName() << "_it);"; in GenExtractor()53 void StructField::GenGetter(std::ostream& s, Size start_offset, Size end_offset) const { in GenGetter() argument54 s << GetDataType() << " " << GetGetterFunctionName() << "() const {"; in GenGetter()55 s << "ASSERT(was_validated_);"; in GenGetter()56 s << "size_t end_index = size();"; in GenGetter()57 s << "auto to_bound = begin();"; in GenGetter()58 int num_leading_bits = GenBounds(s, start_offset, end_offset, GetSize()); in GenGetter()59 s << GetDataType() << " " << GetName() << "_value{};"; in GenGetter()[all …]
73 private void checkEmpty(StaticIpConfiguration s) { in checkEmpty() argument74 assertNull(s.ipAddress); in checkEmpty()75 assertNull(s.gateway); in checkEmpty()76 assertNull(s.domains); in checkEmpty()77 assertEquals(0, s.dnsServers.size()); in checkEmpty()81 StaticIpConfiguration s = new StaticIpConfiguration(); in makeTestObject() local82 s.ipAddress = ADDR; in makeTestObject()83 s.gateway = GATEWAY; in makeTestObject()84 s.dnsServers.add(DNS1); in makeTestObject()85 s.dnsServers.add(DNS2); in makeTestObject()[all …]
88 band->r[0] = __ssat16(band->s + d); in block4()168 band->s = __ssat16(band->sp + band->sz); in block4()172 g722_decode_state_t *g722_decode_init(g722_decode_state_t *s, unsigned int rate, int options) in g722_decode_init() argument174 if (s == NULL) in g722_decode_init()177 if ((s = (g722_decode_state_t *) malloc(sizeof(*s))) == NULL) in g722_decode_init()181 memset(s, 0, sizeof(*s)); in g722_decode_init()183 s->bits_per_sample = 6; in g722_decode_init()185 s->bits_per_sample = 7; in g722_decode_init()187 s->bits_per_sample = 8; in g722_decode_init()188 s->dac_pcm = options & G722_FORMAT_DAC12; in g722_decode_init()[all …]
85 band->r[0] = saturate(band->s + d); in block4()162 band->s = saturate(band->sp + band->sz); in block4()166 g722_encode_state_t *g722_encode_init(g722_encode_state_t *s, in g722_encode_init() argument169 if (s == NULL) in g722_encode_init()172 if ((s = (g722_encode_state_t *) malloc(sizeof(*s))) == NULL) in g722_encode_init()176 memset(s, 0, sizeof(*s)); in g722_encode_init()178 s->bits_per_sample = 6; in g722_encode_init()180 s->bits_per_sample = 7; in g722_encode_init()182 s->bits_per_sample = 8; in g722_encode_init()183 s->band[0].det = 32; in g722_encode_init()[all …]
51 final int s = TextUtils.CAP_MODE_SENTENCES; in allPathsForCaps() local52 onePathForCaps(cs, expectedResult, c | w | s, sp, hasSpaceBefore); in allPathsForCaps()53 onePathForCaps(cs, expectedResult, w | s, sp, hasSpaceBefore); in allPathsForCaps()54 onePathForCaps(cs, expectedResult, c | s, sp, hasSpaceBefore); in allPathsForCaps()58 onePathForCaps(cs, expectedResult, s, sp, hasSpaceBefore); in allPathsForCaps()65 final int s = TextUtils.CAP_MODE_SENTENCES; in testGetCapsMode() local74 allPathsForCaps("", c | w | s, sp, false); in testGetCapsMode()78 allPathsForCaps("Word. ", c | w | s, sp, false); in testGetCapsMode()80 allPathsForCaps("Word.. ", c | w | s, sp, false); in testGetCapsMode()81 allPathsForCaps("Word... ", c | w | s, sp, false); in testGetCapsMode()[all …]
333 static void jdwp_socket_close(asocket* s) { in jdwp_socket_close() argument334 D("LS(%d): closing jdwp socket", s->id); in jdwp_socket_close()336 if (s->peer) { in jdwp_socket_close()337 D("LS(%d) peer->close()ing peer->id=%d peer->fd=%d", s->id, s->peer->id, s->peer->fd); in jdwp_socket_close()338 s->peer->peer = nullptr; in jdwp_socket_close()339 s->peer->close(s->peer); in jdwp_socket_close()340 s->peer = nullptr; in jdwp_socket_close()343 remove_socket(s); in jdwp_socket_close()344 delete s; in jdwp_socket_close()347 static int jdwp_socket_enqueue(asocket* s, apacket::payload_type) { in jdwp_socket_enqueue() argument[all …]
143 static bool do_lstat_v1(int s, const char* path) { in do_lstat_v1() argument152 return WriteFdExactly(s, &msg.stat_v1, sizeof(msg.stat_v1)); in do_lstat_v1()155 static bool do_stat_v2(int s, uint32_t id, const char* path) { in do_stat_v2() argument183 return WriteFdExactly(s, &msg.stat_v2, sizeof(msg.stat_v2)); in do_stat_v2()187 static bool do_list(int s, const char* path) { in do_list() argument235 if (!WriteFdExactly(s, &msg, sizeof(msg)) || in do_list()236 !WriteFdExactly(s, de->d_name, d_name_length)) { in do_list()244 return WriteFdExactly(s, &msg, sizeof(msg)); in do_list()247 static bool do_list_v1(int s, const char* path) { in do_list_v1() argument248 return do_list<false>(s, path); in do_list_v1()[all …]
214 explicit StreamLocalCopy(Stream& original) : s(original), original_(original) {} in StreamLocalCopy()215 ~StreamLocalCopy() { original_ = s; } in ~StreamLocalCopy()217 Stream s; variable229 explicit StreamLocalCopy(Stream& original) : s(original) {} in StreamLocalCopy()231 Stream& s; variable249 InputStream& s(copy.s); in SkipWhitespace()251 while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t') in SkipWhitespace()252 s.Take(); in SkipWhitespace()277 const __m128i s = _mm_load_si128((const __m128i *)p); in SkipWhitespace_SIMD() local278 …const unsigned r = _mm_cvtsi128_si32(_mm_cmpistrm(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _S… in SkipWhitespace_SIMD()[all …]
... flags=,originalFreq=162 130 word=it's,f=162,flags=,originalFreq= ...
... flags=,originalFreq=162 131 word=it's,f=162,flags=,originalFreq= ...
67 } s; in getValueSync() local70 [&s](VhalResult<std::unique_ptr<IHalPropValue>> r) { in getValueSync()72 std::lock_guard<std::mutex> lockGuard(s.lock); in getValueSync()73 s.result = std::move(r); in getValueSync()74 s.gotResult = true; in getValueSync()75 s.cv.notify_one(); in getValueSync()81 std::unique_lock<std::mutex> lk(s.lock); in getValueSync()82 s.cv.wait(lk, [&s] { return s.gotResult; }); in getValueSync()84 return std::move(s.result); in getValueSync()93 } s; in setValueSync() local[all …]