Home
last modified time | relevance | path

Searched refs:variable_width (Results 1 – 3 of 3) sorted by relevance

/external/rust/android-crates-io/crates/pdl-compiler/scripts/
Dgenerate_python_backend.py947 variable_width = []
962 variable_width.append("len(self.payload)")
964 variable_width.append(f"self.{f.id}.size")
966 variable_width.append(f"sum([elt.size for elt in self.{f.id}])")
968 variable_width.append(f"len(self.{f.id}) * {f.type.width}")
970 variable_width.append(f"len(self.{f.id}) * {int(f.width / 8)}")
975 if len(variable_width) == 0:
977 elif len(variable_width) == 1 and constant_width:
979 elif len(variable_width) == 1:
981 elif len(variable_width) > 1 and constant_width:
[all …]
Dgenerate_cxx_backend.py591 variable_width = []
597 variable_width.append(self.get_payload_field_size(var, f, decl))
599 variable_width.append(f"{f.id}_.GetSize()")
601 variable_width.append(f"Get{to_pascal_case(f.id)}Size()")
606 if constant_width and not variable_width:
611 for dyn in variable_width:
1092 variable_width = []
1097 variable_width.append(f"({f.id}_.has_value() ? {f.width} : 0)")
1099 variable_width.append(f"({f.id}_.has_value() ? {f.type.width} : 0)")
1101 variable_width.append(f"({f.id}_.has_value() ? {f.id}_->GetSize() : 0)")
[all …]
/external/pigweed/pw_format/rust/pw_format/
Dlib.rs400 fn variable_width(input: &str) -> IResult<&str, MinFieldWidth> { in variable_width() function
418 alt((variable_width, fixed_width, no_width))(input) in width()