Home
last modified time | relevance | path

Searched refs:range (Results 1 – 25 of 6009) sorted by relevance

12345678910>>...241

/external/guava/guava-tests/test/com/google/common/collect/
DRangeTest.java45 Range<Integer> range = Range.open(4, 8); in testOpen() local
46 checkContains(range); in testOpen()
47 assertTrue(range.hasLowerBound()); in testOpen()
48 assertEquals(4, (int) range.lowerEndpoint()); in testOpen()
49 assertEquals(OPEN, range.lowerBoundType()); in testOpen()
50 assertTrue(range.hasUpperBound()); in testOpen()
51 assertEquals(8, (int) range.upperEndpoint()); in testOpen()
52 assertEquals(OPEN, range.upperBoundType()); in testOpen()
53 assertFalse(range.isEmpty()); in testOpen()
54 assertEquals("(4\u20258)", range.toString()); in testOpen()
[all …]
DGeneralRangeTest.java45 GeneralRange.range(ORDERING, 4, lboundType, 2, uboundType); in testCreateEmptyRangeFails()
55 GeneralRange.range(ORDERING, i, OPEN, i, OPEN); in testCreateEmptyRangeOpenOpenFails()
63 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, CLOSED, i, OPEN); in testCreateEmptyRangeClosedOpenSucceeds() local
65 assertFalse(range.contains(j)); in testCreateEmptyRangeClosedOpenSucceeds()
72 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, OPEN, i, CLOSED); in testCreateEmptyRangeOpenClosedSucceeds() local
74 assertFalse(range.contains(j)); in testCreateEmptyRangeOpenClosedSucceeds()
81 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, CLOSED, i, CLOSED); in testCreateSingletonRangeSucceeds() local
83 assertEquals(Objects.equal(i, j), range.contains(j)); in testCreateSingletonRangeSucceeds()
89 GeneralRange<Integer> range = GeneralRange.range(ORDERING, 3, CLOSED, 3, CLOSED); in testSingletonRange() local
91 assertEquals(ORDERING.compare(i, 3) == 0, range.contains(i)); in testSingletonRange()
[all …]
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/
Dcardinality_test.py36 lambda: dataset_ops.Dataset.range(5).batch(2, drop_remainder=True), 2),
38 lambda: dataset_ops.Dataset.range(5).batch(2, drop_remainder=False), 3),
40 lambda: dataset_ops.Dataset.range(5).filter(lambda _: True).batch(2),
42 ("Batch4", lambda: dataset_ops.Dataset.range(5).repeat().batch(2),
44 ("Cache1", lambda: dataset_ops.Dataset.range(5).cache(), 5),
45 ("Cache2", lambda: dataset_ops.Dataset.range(5).cache("foo"), 5),
46 ("Concatenate1", lambda: dataset_ops.Dataset.range(5).concatenate(
47 dataset_ops.Dataset.range(5)), 10),
49 lambda: dataset_ops.Dataset.range(5).filter(lambda _: True).concatenate(
50 dataset_ops.Dataset.range(5)), cardinality.UNKNOWN),
[all …]
Drebatch_dataset_test.py43 dataset = dataset_ops.Dataset.range(1024).batch(
53 …expected_output = [[k for k in range(i, i + 8)] for i in range(0, 1024, 8)] # pylint: disable=g-c…
57 dataset = dataset_ops.Dataset.range(1024)
62 dataset = dataset_ops.Dataset.range(1024).batch(
72 dataset_ops.Dataset.range(1024).map(lambda x: (x, x)).batch(
75 expected_output = [([k for k in range(i, i + 8)], # pylint: disable=g-complex-comprehension
76 [k for k in range(i, i + 8)])
77 for i in range(0, 1024, 8)]
81 dataset = dataset_ops.Dataset.range(1024).map(
85 … expected_output = [{"a": [k for k in range(i, i + 8)], # pylint: disable=g-complex-comprehension
[all …]
/external/python/cpython3/Lib/test/
Dtest_range.py46 self.assertEqual(list(range(3)), [0, 1, 2])
47 self.assertEqual(list(range(1, 5)), [1, 2, 3, 4])
48 self.assertEqual(list(range(0)), [])
49 self.assertEqual(list(range(-3)), [])
50 self.assertEqual(list(range(1, 10, 3)), [1, 4, 7])
51 self.assertEqual(list(range(5, -5, -3)), [5, 2, -1, -4])
57 self.assertEqual(list(range(a, a+2)), [a, a+1])
58 self.assertEqual(list(range(a+2, a, -1)), [a+2, a+1])
59 self.assertEqual(list(range(a+4, a, -2)), [a+4, a+2])
61 seq = list(range(a, b, c))
[all …]
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_range_op_test.py33 rt1 = ragged_math_ops.range([3, 5, 2])
36 rt2 = ragged_math_ops.range([0, 5, 8], [3, 3, 12])
39 rt3 = ragged_math_ops.range([0, 5, 8], [3, 3, 12], 2)
45 ragged_math_ops.range([0, 3, 5]),
46 [list(range(0)), list(range(3)),
47 list(range(5))])
51 ragged_math_ops.range([0, 3, 5], [2, 3, 10]),
52 [list(range(0, 2)),
53 list(range(3, 3)),
54 list(range(5, 10))])
[all …]
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
DGeneralRangeTest.java43 GeneralRange.range(ORDERING, 4, lboundType, 2, uboundType); in testCreateEmptyRangeFails()
53 GeneralRange.range(ORDERING, i, OPEN, i, OPEN); in testCreateEmptyRangeOpenOpenFails()
61 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, CLOSED, i, OPEN); in testCreateEmptyRangeClosedOpenSucceeds() local
63 assertFalse(range.contains(j)); in testCreateEmptyRangeClosedOpenSucceeds()
70 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, OPEN, i, CLOSED); in testCreateEmptyRangeOpenClosedSucceeds() local
72 assertFalse(range.contains(j)); in testCreateEmptyRangeOpenClosedSucceeds()
79 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, CLOSED, i, CLOSED); in testCreateSingletonRangeSucceeds() local
81 assertEquals(Objects.equal(i, j), range.contains(j)); in testCreateSingletonRangeSucceeds()
87 GeneralRange<Integer> range = GeneralRange.range(ORDERING, 3, CLOSED, 3, CLOSED); in testSingletonRange() local
89 assertEquals(ORDERING.compare(i, 3) == 0, range.contains(i)); in testSingletonRange()
[all …]
/external/perf_data_converter/src/quipper/
Daddress_mapper_test.cc63 const Range& range = ranges[i]; in GetMappedAddressFromRanges() local
64 if (range.contains(addr)) return (addr - range.addr) + mapped_range_addr; in GetMappedAddressFromRanges()
82 bool MapRange(const Range& range, bool remove_old_mappings) { in MapRange() argument
83 VLOG(1) << "Mapping range at " << std::hex << range.addr in MapRange()
84 << " with length of " << range.size << " and id " << range.id; in MapRange()
85 return mapper_->MapWithID(range.addr, range.size, range.id, in MapRange()
86 range.base_offset, remove_old_mappings); in MapRange()
93 void TestMappedRange(const Range& range, uint64_t expected_mapped_addr) { in TestMappedRange() argument
97 VLOG(1) << "Testing range at " << std::hex << range.addr in TestMappedRange()
98 << " with length of " << std::hex << range.size; in TestMappedRange()
[all …]
Daddress_mapper.cc42 MappedRange range; in MapWithID() local
43 range.real_addr = real_addr; in MapWithID()
44 range.size = size; in MapWithID()
45 range.id = id; in MapWithID()
46 range.offset_base = offset_base; in MapWithID()
66 if (!iter->Intersects(range)) continue; in MapWithID()
69 if (old_range_iter == mappings_.end() && iter->Covers(range) && in MapWithID()
70 iter->size > range.size) { in MapWithID()
88 uint64_t gap_before = range.real_addr - old_range.real_addr; in MapWithID()
90 (old_range.real_addr + old_range.size) - (range.real_addr + range.size); in MapWithID()
[all …]
/external/iptables/extensions/
Dlibip6t_SNAT.c50 parse_to(const char *orig_arg, int portok, struct nf_nat_range *range) in parse_to() argument
85 range->flags |= NF_NAT_RANGE_PROTO_SPECIFIED; in parse_to()
99 range->min_proto.tcp.port in parse_to()
100 = range->max_proto.tcp.port in parse_to()
113 range->min_proto.tcp.port = htons(port); in parse_to()
114 range->max_proto.tcp.port = htons(maxport); in parse_to()
124 range->flags |= NF_NAT_RANGE_MAP_IPS; in parse_to()
136 range->min_addr.in6 = *ip; in parse_to()
142 range->max_addr.in6 = *ip; in parse_to()
144 range->max_addr = range->min_addr; in parse_to()
[all …]
Dlibip6t_DNAT.c47 parse_to(const char *orig_arg, int portok, struct nf_nat_range *range) in parse_to() argument
82 range->flags |= NF_NAT_RANGE_PROTO_SPECIFIED; in parse_to()
96 range->min_proto.tcp.port in parse_to()
97 = range->max_proto.tcp.port in parse_to()
110 range->min_proto.tcp.port = htons(port); in parse_to()
111 range->max_proto.tcp.port = htons(maxport); in parse_to()
121 range->flags |= NF_NAT_RANGE_MAP_IPS; in parse_to()
133 range->min_addr.in6 = *ip; in parse_to()
139 range->max_addr.in6 = *ip; in parse_to()
141 range->max_addr = range->min_addr; in parse_to()
[all …]
Dlibip6t_REDIRECT.c40 parse_ports(const char *arg, struct nf_nat_range *range) in parse_ports() argument
45 range->flags |= NF_NAT_RANGE_PROTO_SPECIFIED; in parse_ports()
53 range->min_proto.tcp.port in parse_ports()
54 = range->max_proto.tcp.port in parse_ports()
65 range->min_proto.tcp.port = htons(port); in parse_ports()
66 range->max_proto.tcp.port = htons(maxport); in parse_ports()
77 struct nf_nat_range *range = (void *)(*cb->target)->data; in REDIRECT_parse() local
95 parse_ports(cb->arg, range); in REDIRECT_parse()
97 range->flags |= NF_NAT_RANGE_PROTO_RANDOM; in REDIRECT_parse()
101 range->flags |= NF_NAT_RANGE_PROTO_RANDOM; in REDIRECT_parse()
[all …]
/external/google-breakpad/src/tools/linux/md2core/
Dminidump_memory_range_unittest.cc96 MinidumpMemoryRange range; in TEST() local
97 EXPECT_EQ(NULL, range.data()); in TEST()
98 EXPECT_EQ(0U, range.length()); in TEST()
102 MinidumpMemoryRange range(kBuffer, kBufferSize); in TEST() local
103 EXPECT_EQ(kBufferPointer, range.data()); in TEST()
104 EXPECT_EQ(kBufferSize, range.length()); in TEST()
108 MinidumpMemoryRange range; in TEST() local
109 range.Reset(); in TEST()
110 EXPECT_EQ(NULL, range.data()); in TEST()
111 EXPECT_EQ(0U, range.length()); in TEST()
[all …]
/external/v8/src/compiler/
Dlive-range-separator.cc22 void CreateSplinter(TopLevelLiveRange *range, RegisterAllocationData *data, in CreateSplinter() argument
24 DCHECK(!range->IsSplinter()); in CreateSplinter()
32 if (first_cut <= range->Start() && max_allowed_end >= range->End()) { in CreateSplinter()
36 LifetimePosition start = Max(first_cut, range->Start()); in CreateSplinter()
37 LifetimePosition end = Min(last_cut, range->End()); in CreateSplinter()
44 if (range->MayRequireSpillRange()) { in CreateSplinter()
45 data->CreateSpillRangeForLiveRange(range); in CreateSplinter()
47 if (range->splinter() == nullptr) { in CreateSplinter()
49 data->NextLiveRange(range->representation()); in CreateSplinter()
52 range->SetSplinter(splinter); in CreateSplinter()
[all …]
/external/google-breakpad/src/common/
Dmemory_range_unittest.cc95 MemoryRange range; in TEST() local
96 EXPECT_EQ(NULL, range.data()); in TEST()
97 EXPECT_EQ(0U, range.length()); in TEST()
101 MemoryRange range(kBuffer, kBufferSize); in TEST() local
102 EXPECT_EQ(kBufferPointer, range.data()); in TEST()
103 EXPECT_EQ(kBufferSize, range.length()); in TEST()
107 MemoryRange range; in TEST() local
108 range.Reset(); in TEST()
109 EXPECT_EQ(NULL, range.data()); in TEST()
110 EXPECT_EQ(0U, range.length()); in TEST()
[all …]
/external/skqp/src/pdf/
DSkPDFMakeCIDGlyphWidthsArray.cpp59 AdvanceMetric* range) { in strip_uninteresting_trailing_advances_from_range() argument
60 SkASSERT(range); in strip_uninteresting_trailing_advances_from_range()
62 int expectedAdvanceCount = range->fEndId - range->fStartId + 1; in strip_uninteresting_trailing_advances_from_range()
63 if (SkToInt(range->fAdvance.size()) < expectedAdvanceCount) { in strip_uninteresting_trailing_advances_from_range()
68 if (range->fAdvance[i] != kDontCareAdvance && in strip_uninteresting_trailing_advances_from_range()
69 range->fAdvance[i] != kInvalidAdvance && in strip_uninteresting_trailing_advances_from_range()
70 range->fAdvance[i] != 0) { in strip_uninteresting_trailing_advances_from_range()
71 range->fEndId = range->fStartId + i; in strip_uninteresting_trailing_advances_from_range()
77 static void zero_wildcards_in_range(AdvanceMetric* range) { in zero_wildcards_in_range() argument
78 SkASSERT(range); in zero_wildcards_in_range()
[all …]
/external/skia/src/pdf/
DSkPDFMakeCIDGlyphWidthsArray.cpp59 AdvanceMetric* range) { in strip_uninteresting_trailing_advances_from_range() argument
60 SkASSERT(range); in strip_uninteresting_trailing_advances_from_range()
62 int expectedAdvanceCount = range->fEndId - range->fStartId + 1; in strip_uninteresting_trailing_advances_from_range()
63 if (SkToInt(range->fAdvance.size()) < expectedAdvanceCount) { in strip_uninteresting_trailing_advances_from_range()
68 if (range->fAdvance[i] != kDontCareAdvance && in strip_uninteresting_trailing_advances_from_range()
69 range->fAdvance[i] != kInvalidAdvance && in strip_uninteresting_trailing_advances_from_range()
70 range->fAdvance[i] != 0) { in strip_uninteresting_trailing_advances_from_range()
71 range->fEndId = range->fStartId + i; in strip_uninteresting_trailing_advances_from_range()
77 static void zero_wildcards_in_range(AdvanceMetric* range) { in zero_wildcards_in_range() argument
78 SkASSERT(range); in zero_wildcards_in_range()
[all …]
/external/mesa3d/src/gallium/auxiliary/util/
Du_range.h51 util_range_set_empty(struct util_range *range) in util_range_set_empty() argument
53 range->start = ~0; in util_range_set_empty()
54 range->end = 0; in util_range_set_empty()
59 util_range_add(struct util_range *range, unsigned start, unsigned end) in util_range_add() argument
61 if (start < range->start || end > range->end) { in util_range_add()
62 mtx_lock(&range->write_mutex); in util_range_add()
63 range->start = MIN2(start, range->start); in util_range_add()
64 range->end = MAX2(end, range->end); in util_range_add()
65 mtx_unlock(&range->write_mutex); in util_range_add()
70 util_ranges_intersect(struct util_range *range, unsigned start, unsigned end) in util_ranges_intersect() argument
[all …]
/external/elfutils/tests/
Drun-get-aranges.sh24 0x804842b: not in range
28 0x804845a: not in range
29 0x804845b: not in range
33 0x8048466: not in range
34 0x8048467: not in range
38 0x8048472: not in range
45 0x804842b: not in range
46 0x804842c: not in range
47 0x804843c: not in range
48 0x8048459: not in range
[all …]
Drun-readelf-loc.sh68 [ 0] range 0, d
72 [ 23] range 5, d
78 [ 46] range 12, 1a
86 [ 0] range 0, 2
89 range 5, d
94 [ 30] range d, f
97 range 12, 1a
109 [ 0] range 0, d
113 [ 23] range 5, d
119 [ 46] range 12, 1a
[all …]
/external/selinux/libsepol/include/sepol/policydb/
Dcontext.h37 mls_range_t range; member
42 mls_range_init(&c->range); in mls_context_init()
49 if (mls_range_cpy(&dst->range, &src->range) < 0) in mls_context_cpy()
62 dst->range.level[0].sens = src->range.level[0].sens; in mls_context_cpy_low()
63 rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[0].cat); in mls_context_cpy_low()
67 dst->range.level[1].sens = src->range.level[0].sens; in mls_context_cpy_low()
68 rc = ebitmap_cpy(&dst->range.level[1].cat, &src->range.level[0].cat); in mls_context_cpy_low()
70 ebitmap_destroy(&dst->range.level[0].cat); in mls_context_cpy_low()
82 dst->range.level[0].sens = src->range.level[1].sens; in mls_context_cpy_high()
83 rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[1].cat); in mls_context_cpy_high()
[all …]
/external/selinux/libsepol/src/
Dmls.c113 unsigned int i, l, len, range; in mls_compute_context_len() local
121 range = 0; in mls_compute_context_len()
124 p_sens_val_to_name[context->range.level[l].sens - in mls_compute_context_len()
127 ebitmap_for_each_bit(&context->range.level[l].cat, cnode, i) { in mls_compute_context_len()
129 if (range) { in mls_compute_context_len()
130 range++; in mls_compute_context_len()
136 range++; in mls_compute_context_len()
138 if (range > 1) in mls_compute_context_len()
143 range = 0; in mls_compute_context_len()
147 if (range > 1) in mls_compute_context_len()
[all …]
/external/tensorflow/tensorflow/contrib/boosted_trees/lib/utils/
Dsparse_column_iterable_test.cc51 auto validate_example_range = [](const ExampleRowRange& range) { in TEST_F() argument
52 switch (range.example_idx) { in TEST_F()
54 EXPECT_EQ(0, range.start); in TEST_F()
55 EXPECT_EQ(1, range.end); in TEST_F()
58 EXPECT_EQ(1, range.start); in TEST_F()
59 EXPECT_EQ(4, range.end); in TEST_F()
62 EXPECT_EQ(4, range.start); in TEST_F()
63 EXPECT_EQ(5, range.end); in TEST_F()
66 EXPECT_EQ(5, range.start); in TEST_F()
67 EXPECT_EQ(7, range.end); in TEST_F()
[all …]
/external/pdfium/core/fpdfapi/font/
Dcpdf_cmapparser_unittest.cpp43 CPDF_CMap::CodeRange range; in TEST() local
46 EXPECT_FALSE(parser.GetCodeRange(range, "", "")); in TEST()
47 EXPECT_FALSE(parser.GetCodeRange(range, "A", "")); in TEST()
50 EXPECT_FALSE(parser.GetCodeRange(range, "<aaaaaaaaaa>", "")); in TEST()
51 EXPECT_EQ(5u, range.m_CharSize); in TEST()
53 EXPECT_TRUE(parser.GetCodeRange(range, "<12345678>", "<87654321>")); in TEST()
54 EXPECT_EQ(4u, range.m_CharSize); in TEST()
58 EXPECT_TRUE(uint_ranges_equal(lower, range.m_Lower, range.m_CharSize)); in TEST()
59 EXPECT_TRUE(uint_ranges_equal(upper, range.m_Upper, range.m_CharSize)); in TEST()
63 EXPECT_TRUE(parser.GetCodeRange(range, "<a1>", "<F3>")); in TEST()
[all …]
/external/e2fsprogs/contrib/android/
Dblock_range.c8 struct block_range *range = malloc(sizeof(*range)); in new_block_range() local
9 range->start = start; in new_block_range()
10 range->end = end; in new_block_range()
11 range->next = NULL; in new_block_range()
12 return range; in new_block_range()
23 struct block_range *range = new_block_range(blk_start, blk_end); in add_blocks_to_range() local
24 (*tail)->next = range; in add_blocks_to_range()
25 *tail = range; in add_blocks_to_range()
40 int write_block_ranges(FILE *f, struct block_range *range, in write_block_ranges() argument
46 while (range) { in write_block_ranges()
[all …]

12345678910>>...241