Home
last modified time | relevance | path

Searched full:quantity (Results 1 – 25 of 405) sorted by relevance

12345678910>>...17

/external/clang/include/clang/AST/
DCharUnits.h24 /// Instances of this type represent a quantity as a multiple of the size
31 /// the same quantity of storage. However, we use the term 'character unit'
43 QuantityType Quantity;
45 explicit CharUnits(QuantityType C) : Quantity(C) {} in CharUnits()
50 CharUnits() : Quantity(0) {} in CharUnits()
52 /// Zero - Construct a CharUnits quantity of zero.
57 /// One - Construct a CharUnits quantity of one.
62 /// fromQuantity - Construct a CharUnits quantity from a raw integer type.
63 static CharUnits fromQuantity(QuantityType Quantity) { in fromQuantity() argument
64 return CharUnits(Quantity); in fromQuantity()
[all …]
/external/libcxx/benchmarks/
Dalgorithms.bench.cpp115 void runOpOnCopies(benchmark::State& state, size_t Quantity, Order O, in runOpOnCopies() argument
117 auto Copies = makeOrderedValues<ValueType>(Quantity, O); in runOpOnCopies()
120 const size_t Batch = CountElements ? Copies.size() * Quantity : Copies.size(); in runOpOnCopies()
132 size_t Quantity; member
135 runOpOnCopies<ValueType>(state, Quantity, Order(), false, [](auto& Copy) { in run()
144 std::to_string(Quantity); in name()
150 size_t Quantity; member
153 runOpOnCopies<ValueType>(state, Quantity, Order(), false, [](auto& Copy) { in run()
162 std::to_string(Quantity); in name()
168 size_t Quantity; member
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DMicroPropsGenerator.java7 …* for the quantity itself. The {@link #processQuantity} method performs the final step in the numb…
8 …* processing pipeline: it uses the quantity to generate a finalized {@link MicroProps}, which can …
13 * <em>quantity-dependent</em>.
18 * quantity-dependent part of the MicroProps. At the top of the linked list is a base instance of
19 …* {@link MicroProps} with properties that are not quantity-dependent. Each element in the linked l…
34 * public MicroProps processQuantity(DecimalQuantity quantity) {
35 * MicroProps micros = this.parent.processQuantity(quantity);
36 * // Perform manipulations on micros and/or quantity
50 * @param quantity
51 * The quantity for consideration and optional mutation.
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/
DMicroPropsGenerator.java8 …* for the quantity itself. The {@link #processQuantity} method performs the final step in the numb…
9 …* processing pipeline: it uses the quantity to generate a finalized {@link MicroProps}, which can …
14 * <em>quantity-dependent</em>.
19 * quantity-dependent part of the MicroProps. At the top of the linked list is a base instance of
20 …* {@link MicroProps} with properties that are not quantity-dependent. Each element in the linked l…
35 * public MicroProps processQuantity(DecimalQuantity quantity) {
36 * MicroProps micros = this.parent.processQuantity(quantity);
37 * // Perform manipulations on micros and/or quantity
52 * @param quantity
53 * The quantity for consideration and optional mutation.
[all …]
/external/icu/icu4c/source/i18n/
Dnumparse_parsednumber.cpp29 quantity.bogus = true; in clear()
42 if (!quantity.bogus && 0 != (flags & FLAG_NEGATIVE)) { in postProcess()
43 quantity.negate(); in postProcess()
52 return !quantity.bogus || 0 != (flags & FLAG_NAN) || 0 != (flags & FLAG_INFINITY); in seenNumber()
72 U_ASSERT(!quantity.bogus); in getDouble()
73 if (quantity.isZero() && quantity.isNegative()) { in getDouble()
77 if (quantity.fitsInLong()) { in getDouble()
78 return static_cast<double>(quantity.toLong()); in getDouble()
80 return quantity.toDouble(); in getDouble()
105 U_ASSERT(!quantity.bogus); in populateFormattable()
[all …]
Dnumber_multiplier.cpp127 void Scale::applyTo(impl::DecimalQuantity& quantity) const { in applyTo()
128 quantity.adjustMagnitude(fMagnitude); in applyTo()
131 quantity.multiplyBy(*fArbitrary, localStatus); in applyTo()
135 void Scale::applyReciprocalTo(impl::DecimalQuantity& quantity) const { in applyReciprocalTo()
136 quantity.adjustMagnitude(-fMagnitude); in applyReciprocalTo()
139 quantity.divideBy(*fArbitrary, localStatus); in applyReciprocalTo()
150 void MultiplierFormatHandler::processQuantity(DecimalQuantity& quantity, MicroProps& micros, in processQuantity() argument
152 fParent->processQuantity(quantity, micros, status); in processQuantity()
153 fMultiplier.applyTo(quantity); in processQuantity()
Dnumber_types.h235 … used when all number formatting settings, including the locale, are known, except for the quantity
237 …* quantity to generate a finalized {@link MicroProps}, which can be used to render the number to o…
240 …* In other words, this interface is used for the parts of number processing that are <em>quantity-…
244 …* are linked together, and each one is responsible for manipulating a certain quantity-dependent p…
246 …* quantity-dependent. Each element in the linked list calls {@link #processQuantity} on its "paren…
259 * @param quantity
260 * The quantity for consideration and optional mutation.
263 * @return A MicroProps instance resolved for the quantity.
265 virtual void processQuantity(DecimalQuantity& quantity, MicroProps& micros,
Dnumber_formatimpl.cpp441 int32_t NumberFormatterImpl::writeNumber(const MicroProps& micros, DecimalQuantity& quantity, in writeNumber() argument
445 if (quantity.isInfinite()) { in writeNumber()
452 } else if (quantity.isNaN()) { in writeNumber()
461 length += writeIntegerDigits(micros, quantity, string, length + index, status); in writeNumber()
464 … if (quantity.getLowerDisplayMagnitude() < 0 || micros.decimal == UNUM_DECIMAL_SEPARATOR_ALWAYS) { in writeNumber()
477 length += writeFractionDigits(micros, quantity, string, length + index, status); in writeNumber()
483 int32_t NumberFormatterImpl::writeIntegerDigits(const MicroProps& micros, DecimalQuantity& quantity, in writeIntegerDigits() argument
487 int integerCount = quantity.getUpperDisplayMagnitude() + 1; in writeIntegerDigits()
490 if (micros.grouping.groupAtPosition(i, quantity)) { in writeIntegerDigits()
502 int8_t nextDigit = quantity.getDigit(i); in writeIntegerDigits()
[all …]
Dnumber_scientific.cpp122 void ScientificHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
124 fParent->processQuantity(quantity, micros, status); in processQuantity()
129 if (quantity.isZero()) { in processQuantity()
132 micros.rounder.apply(quantity, fSettings.fEngineeringInterval, status); in processQuantity()
135 micros.rounder.apply(quantity, status); in processQuantity()
139 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, *this, status); in processQuantity()
/external/robolectric-shadows/resources/src/main/java/org/robolectric/res/
DPlural.java4 final String quantity, string; field in Plural
8 Plural(String quantity, String string) { in Plural() argument
9 this.quantity = quantity; in Plural()
11 if ("zero".equals(quantity)) { in Plural()
14 } else if ("one".equals(quantity)) { in Plural()
17 } else if ("two".equals(quantity)) { in Plural()
20 } else if ("other".equals(quantity)) { in Plural()
35 return quantity + "(" + num + "): " + string; in toString()
DStaxPluralsLoader.java10 private String quantity; field in StaxPluralsLoader
21 quantity = xml.getAttributeValue(null, "quantity"); in StaxPluralsLoader()
32 plurals.add(new Plural(quantity, buf.toString())); in StaxPluralsLoader()
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/parse/
DParsedNumber.java22 public DecimalQuantity_DualStorageBCD quantity; field in ParsedNumber
78 quantity = null; in clear()
87 quantity = other.quantity == null ? null in copyFrom()
88 : (DecimalQuantity_DualStorageBCD) other.quantity.createCopy(); in copyFrom()
118 if (quantity != null && 0 != (flags & FLAG_NEGATIVE)) { in postProcess()
119 quantity.negate(); in postProcess()
132 return quantity != null || 0 != (flags & FLAG_NAN) || 0 != (flags & FLAG_INFINITY); in seenNumber()
157 assert quantity != null; in getNumber()
158 if (quantity.isZero() && quantity.isNegative() && !integerOnly) { in getNumber()
162 if (quantity.fitsInLong() && !forceBigDecimal) { in getNumber()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/
DParsedNumber.java20 public DecimalQuantity_DualStorageBCD quantity; field in ParsedNumber
76 quantity = null; in clear()
85 quantity = other.quantity == null ? null in copyFrom()
86 : (DecimalQuantity_DualStorageBCD) other.quantity.createCopy(); in copyFrom()
116 if (quantity != null && 0 != (flags & FLAG_NEGATIVE)) { in postProcess()
117 quantity.negate(); in postProcess()
130 return quantity != null || 0 != (flags & FLAG_NAN) || 0 != (flags & FLAG_INFINITY); in seenNumber()
155 assert quantity != null; in getNumber()
156 if (quantity.isZero() && quantity.isNegative() && !integerOnly) { in getNumber()
160 if (quantity.fitsInLong() && !forceBigDecimal) { in getNumber()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/
DDecimalQuantityTest.java414 DecimalQuantity_DualStorageBCD quantity = new DecimalQuantity_DualStorageBCD(); in testFitsInLong() local
415 quantity.setToInt(0); in testFitsInLong()
416 assertTrue("Zero should fit", quantity.fitsInLong()); in testFitsInLong()
417 quantity.setToInt(42); in testFitsInLong()
418 assertTrue("Small int should fit", quantity.fitsInLong()); in testFitsInLong()
419 quantity.setToDouble(0.1); in testFitsInLong()
420 assertFalse("Fraction should not fit", quantity.fitsInLong()); in testFitsInLong()
421 quantity.setToDouble(42.1); in testFitsInLong()
422 assertFalse("Fraction should not fit", quantity.fitsInLong()); in testFitsInLong()
423 quantity.setToLong(1000000); in testFitsInLong()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/number/
DDecimalQuantityTest.java417 DecimalQuantity_DualStorageBCD quantity = new DecimalQuantity_DualStorageBCD(); in testFitsInLong() local
418 quantity.setToInt(0); in testFitsInLong()
419 assertTrue("Zero should fit", quantity.fitsInLong()); in testFitsInLong()
420 quantity.setToInt(42); in testFitsInLong()
421 assertTrue("Small int should fit", quantity.fitsInLong()); in testFitsInLong()
422 quantity.setToDouble(0.1); in testFitsInLong()
423 assertFalse("Fraction should not fit", quantity.fitsInLong()); in testFitsInLong()
424 quantity.setToDouble(42.1); in testFitsInLong()
425 assertFalse("Fraction should not fit", quantity.fitsInLong()); in testFitsInLong()
426 quantity.setToLong(1000000); in testFitsInLong()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/number/
DCompactNotation.java120 public MicroProps processQuantity(DecimalQuantity quantity) { in processQuantity() argument
121 MicroProps micros = parent.processQuantity(quantity); in processQuantity()
126 if (quantity.isZero()) { in processQuantity()
128 micros.rounder.apply(quantity); in processQuantity()
131 int multiplier = micros.rounder.chooseMultiplierAndApply(quantity, data); in processQuantity()
132 magnitude = quantity.isZero() ? 0 : quantity.getMagnitude(); in processQuantity()
136 StandardPlural plural = quantity.getStandardPlural(rules); in processQuantity()
145 mod.applyToMicros(micros, quantity); in processQuantity()
DScale.java13 * A class that defines a quantity by which a number should be multiplied when formatting.
184 public void applyTo(DecimalQuantity quantity) { in applyTo() argument
185 quantity.adjustMagnitude(magnitude); in applyTo()
187 quantity.multiplyBy(arbitrary); in applyTo()
196 public void applyReciprocalTo(DecimalQuantity quantity) { in applyReciprocalTo() argument
197 quantity.adjustMagnitude(-magnitude); in applyReciprocalTo()
199 quantity.multiplyBy(reciprocal); in applyReciprocalTo()
200 quantity.roundToMagnitude(quantity.getMagnitude() - mc.getPrecision(), mc); in applyReciprocalTo()
DNumberFormatterImpl.java129 DecimalQuantity_DualStorageBCD quantity = new DecimalQuantity_DualStorageBCD(0); in getPrefixSuffixImpl() local
131 quantity.negate(); in getPrefixSuffixImpl()
133 MicroProps micros = generator.processQuantity(quantity); in getPrefixSuffixImpl()
161 … * encoded into the MicroPropsGenerator, except for the quantity itself, which is left abstract and
408 DecimalQuantity quantity, in writeNumber() argument
412 if (quantity.isInfinite()) { in writeNumber()
415 } else if (quantity.isNaN()) { in writeNumber()
420 length += writeIntegerDigits(micros, quantity, string, length + index); in writeNumber()
423 if (quantity.getLowerDisplayMagnitude() < 0 in writeNumber()
432 length += writeFractionDigits(micros, quantity, string, length + index); in writeNumber()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/number/
DCompactNotation.java121 public MicroProps processQuantity(DecimalQuantity quantity) { in processQuantity() argument
122 MicroProps micros = parent.processQuantity(quantity); in processQuantity()
127 if (quantity.isZero()) { in processQuantity()
129 micros.rounder.apply(quantity); in processQuantity()
132 int multiplier = micros.rounder.chooseMultiplierAndApply(quantity, data); in processQuantity()
133 magnitude = quantity.isZero() ? 0 : quantity.getMagnitude(); in processQuantity()
137 StandardPlural plural = quantity.getStandardPlural(rules); in processQuantity()
146 mod.applyToMicros(micros, quantity); in processQuantity()
DScale.java14 * A class that defines a quantity by which a number should be multiplied when formatting.
180 public void applyTo(DecimalQuantity quantity) { in applyTo() argument
181 quantity.adjustMagnitude(magnitude); in applyTo()
183 quantity.multiplyBy(arbitrary); in applyTo()
192 public void applyReciprocalTo(DecimalQuantity quantity) { in applyReciprocalTo() argument
193 quantity.adjustMagnitude(-magnitude); in applyReciprocalTo()
195 quantity.multiplyBy(reciprocal); in applyReciprocalTo()
196 quantity.roundToMagnitude(quantity.getMagnitude() - mc.getPrecision(), mc); in applyReciprocalTo()
DNumberFormatterImpl.java130 DecimalQuantity_DualStorageBCD quantity = new DecimalQuantity_DualStorageBCD(0); in getPrefixSuffixImpl() local
132 quantity.negate(); in getPrefixSuffixImpl()
134 MicroProps micros = generator.processQuantity(quantity); in getPrefixSuffixImpl()
162 … * encoded into the MicroPropsGenerator, except for the quantity itself, which is left abstract and
409 DecimalQuantity quantity, in writeNumber() argument
413 if (quantity.isInfinite()) { in writeNumber()
416 } else if (quantity.isNaN()) { in writeNumber()
421 length += writeIntegerDigits(micros, quantity, string, length + index); in writeNumber()
424 if (quantity.getLowerDisplayMagnitude() < 0 in writeNumber()
433 length += writeFractionDigits(micros, quantity, string, length + index); in writeNumber()
[all …]
/external/robolectric-shadows/robolectric/src/test/resources/res/values/
Dplurals.xml8 <item quantity="one">a beer</item>
9 <item quantity="other">some beers</item>
12 <item quantity="one">@string/minute_singular</item>
13 <item quantity="other">@string/minute_plural</item>
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowNativePluralRules.java14 protected static int quantityForIntImpl(long address, int quantity) { in quantityForIntImpl() argument
16 if (quantity == 1) return 1; in quantityForIntImpl()
21 protected static int quantityForIntImpl(int address, int quantity) { in quantityForIntImpl() argument
22 return quantityForIntImpl((long)address, quantity); in quantityForIntImpl()
/external/libxml2/test/schemas/
Dpo0_0.xml21 <quantity>1</quantity>
27 <quantity>1</quantity>
Dpo1_0.xml22 <quantity>1</quantity>
28 <quantity>1</quantity>

12345678910>>...17