Skip to content

Commit 8db6471

Browse files
committed
Merge branch 'master_community' into conn_opt
2 parents e139459 + eb00bfc commit 8db6471

File tree

10 files changed

+47
-49
lines changed

10 files changed

+47
-49
lines changed

src/examples/hotgym/HelloSPTP.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Real64 BenchmarkHotgym::run(UInt EPOCHS, bool useSPlocal, bool useSPglobal, bool
6464
SpatialPooler spLocal(enc.dimensions, vector<UInt>{COLS}); // Spatial pooler with local inh
6565
spGlobal.setGlobalInhibition(true);
6666
spLocal.setGlobalInhibition(false);
67-
Random rnd(1); //uses fixed seed for deterministic output checks
67+
Random rnd(42); //uses fixed seed for deterministic output checks
6868

6969
TemporalMemory tm(vector<UInt>{COLS}, CELLS);
7070

@@ -166,29 +166,29 @@ Real64 BenchmarkHotgym::run(UInt EPOCHS, bool useSPlocal, bool useSPglobal, bool
166166
// check deterministic SP, TM output
167167
SDR goldEnc({DIM_INPUT});
168168
const SDR_sparse_t deterministicEnc{
169-
0, 4, 13, 21, 24, 30, 32, 37, 40, 46, 47, 48, 50, 51, 64, 68, 79, 81, 89, 97, 99, 114, 120, 135, 136, 140, 141, 143, 144, 147, 151, 155, 161, 162, 164, 165, 169, 172, 174, 179, 181, 192, 201, 204, 205, 210, 213, 226, 237, 242, 247, 249, 254, 255, 262, 268, 271, 282, 283, 295, 302, 306, 307, 317, 330, 349, 353, 366, 368, 380, 393, 399, 404, 409, 410, 420, 422, 441,446, 447, 456, 458, 464, 468, 476, 497, 499, 512, 521, 528, 531, 534, 538, 539, 541, 545, 550, 557, 562, 565, 575, 581, 589, 592, 599, 613, 617, 622, 647, 652, 686, 687, 691, 699, 704, 710, 713, 716, 722, 729, 736, 740, 747, 749, 753, 754, 758, 766, 778, 790, 791, 797, 800, 808, 809, 812, 815, 826, 828, 830, 837, 838, 852, 853, 856, 863, 864, 873, 878, 882, 885, 893, 894, 895, 905, 906, 914, 915, 920, 924, 927, 937, 939, 944, 947, 951, 954, 956, 967, 968, 969, 973, 975, 976, 981, 991, 998
169+
0, 4, 13, 21, 24, 30, 32, 37, 40, 46, 47, 48, 50, 51, 64, 68, 79, 81, 89, 97, 99, 114, 120, 135, 136, 140, 141, 143, 144, 147, 151, 155, 161, 162, 164, 165, 169, 172, 174, 179, 181, 192, 201, 204, 205, 210, 213, 226, 227, 237, 242, 247, 249, 254, 255, 262, 268, 271, 282, 283, 295, 302, 306, 307, 317, 330, 349, 353, 366, 380, 383, 393, 404, 409, 410, 420, 422, 441,446, 447, 456, 458, 464, 468, 476, 497, 499, 512, 521, 528, 531, 534, 538, 539, 541, 545, 550, 557, 562, 565, 575, 581, 589, 592, 599, 613, 617, 622, 647, 652, 686, 687, 691, 699, 704, 710, 713, 716, 722, 729, 736, 740, 747, 749, 753, 754, 758, 766, 778, 790, 791, 797, 800, 808, 809, 812, 815, 826, 828, 830, 837, 852, 853, 856, 863, 864, 873, 878, 882, 885, 893, 894, 895, 905, 906, 914, 915, 920, 924, 927, 937, 939, 944, 947, 951, 954, 956, 967, 968, 969, 973, 975, 976, 979, 981, 991, 998
170170
};
171171
goldEnc.setSparse(deterministicEnc);
172172

173173
SDR goldSP({COLS});
174174
const SDR_sparse_t deterministicSP{
175-
72, 75, 284, 303, 305, 317, 329, 525, 1095, 2027
175+
72, 308, 337, 1512, 1518, 1956, 1965, 1975, 1994, 2008
176176
};
177177
goldSP.setSparse(deterministicSP);
178178

179179
SDR goldSPlocal({COLS});
180180
const SDR_sparse_t deterministicSPlocal{
181-
6, 12, 26, 57, 63, 72, 75, 76, 77, 80, 82, 103, 105, 124, 135, 154, 171, 174, 175, 185, 192, 193, 195, 198, 263, 284, 296, 302, 303, 305, 313, 317, 319, 320, 356, 363, 364, 401, 403, 404, 410, 413, 425, 426, 428, 449, 491, 496, 511, 515, 516, 518, 520, 525, 529, 536, 550, 556, 574, 583, 592, 597, 598, 603, 609, 622, 626, 636, 645, 652, 704, 706, 722, 726, 727, 728, 729, 747, 751, 766, 779, 808, 833, 837, 838, 840, 848, 850, 853, 860, 908, 912, 918, 919, 923, 927, 929, 930, 931, 932, 970, 989, 1006, 1038, 1066, 1082, 1085, 1087, 1092, 1094, 1095, 1113, 1115, 1125, 1128, 1174, 1179, 1180, 1182, 1185, 1205, 1206, 1232, 1236, 1238, 1239, 1240, 1245, 1271, 1292, 1295, 1300, 1303, 1307, 1311, 1319, 1320, 1322, 1382, 1401, 1412, 1415, 1421, 1426, 1431, 1434, 1438, 1470, 1474, 1492, 1501, 1511, 1521, 1524, 1525, 1530, 1532, 1537, 1540, 1600, 1617, 1620, 1622, 1632, 1638, 1641, 1667, 1672, 1680, 1684, 1686, 1690, 1699, 1702, 1742, 1744, 1745, 1746, 1765, 1770, 1774, 1801, 1807, 1808, 1816, 1830, 1834, 1849, 1861, 1867, 1871, 1882, 1902, 1907, 1943, 1945, 1955, 1956, 1966, 1968, 1969, 1971, 1986, 2018, 2025, 2027
181+
12, 17, 36, 39, 62, 71, 72, 74, 75, 82, 83, 85, 93, 102, 131, 147, 171, 179, 186, 188, 189, 192, 194, 201, 260, 263, 277, 287, 298, 308, 319, 322, 323, 326, 334, 337, 340, 355, 365, 407, 422, 423, 425, 427, 429, 432, 434, 443, 445, 493, 494, 498, 502, 508, 513, 523, 534, 540, 542, 554, 559, 580, 585, 586, 610, 611, 612, 629, 631, 637, 644, 645, 646, 647, 691, 697, 698, 702, 703, 707, 709, 746, 749, 767, 806, 809, 810, 811, 825, 832, 833, 838, 839, 847, 889, 906, 920, 923, 928, 929, 931, 934, 935, 936, 952, 989, 1003, 1005, 1018, 1073, 1076, 1078, 1089, 1094, 1095, 1100, 1102, 1114, 1115, 1133, 1134, 1147, 1168, 1169, 1184, 1193, 1196, 1203, 1204, 1209, 1232, 1233, 1236, 1244, 1253, 1254, 1268, 1278, 1284, 1294, 1297, 1298, 1303, 1306, 1310, 1331, 1342, 1402, 1410, 1415, 1423, 1427, 1428, 1430, 1434, 1463, 1487, 1488, 1494, 1507, 1508, 1512, 1515, 1518, 1532, 1547, 1550, 1561, 1563, 1564, 1612, 1622, 1623, 1624, 1626, 1627, 1630, 1640, 1647, 1651, 1689, 1691, 1694, 1703, 1711, 1714, 1729, 1745, 1746, 1760, 1771, 1797, 1803, 1804, 1805, 1812, 1827, 1828, 1831, 1858, 1859, 1860, 1861, 1862, 1880, 1918, 1929, 1937, 1956, 1961, 1965, 1967, 1971, 1980, 1985, 1994, 2008, 2011, 2013
182182
};
183183
goldSPlocal.setSparse(deterministicSPlocal);
184184

185185
SDR goldTM({COLS});
186186
const SDR_sparse_t deterministicTM{
187-
26, 75 //FIXME this is a really bad representation -> improve the params
187+
1965 //FIXME this is a really bad representation -> improve the params
188188
};
189189
goldTM.setSparse(deterministicTM);
190190

191-
const float goldAn = 0.8f;
191+
const float goldAn = 1.0f;
192192

193193
if(EPOCHS == 5000) { //these hand-written values are only valid for EPOCHS = 5000 (default), but not for debug and custom runs.
194194
NTA_CHECK(input == goldEnc) << "Deterministic output of Encoder failed!\n" << input << "should be:\n" << goldEnc;
@@ -197,7 +197,7 @@ Real64 BenchmarkHotgym::run(UInt EPOCHS, bool useSPlocal, bool useSPglobal, bool
197197
if(useTM) { NTA_CHECK(outTM == goldTM) << "Deterministic output of TM failed!\n" << outTM << "should be:\n" << goldTM; }
198198
NTA_CHECK(static_cast<UInt>(an *10000.0f) == static_cast<UInt>(goldAn *10000.0f)) //compare to 4 decimal places
199199
<< "Deterministic output of Anomaly failed! " << an << "should be: " << goldAn;
200-
NTA_CHECK(avgAnom10.getCurrentAvg() <= 0.82f) << "Deterministic average anom score failed:" << avgAnom10.getCurrentAvg();
200+
NTA_CHECK(avgAnom10.getCurrentAvg() <= 0.8f) << "Deterministic average anom score failed:" << avgAnom10.getCurrentAvg();
201201
}
202202

203203
// check runtime speed

src/htm/algorithms/Connections.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ void Connections::destroySegment(Segment segment) {
199199
const auto segmentOnCell =
200200
std::lower_bound(cellData.segments.begin(), cellData.segments.end(),
201201
segment, [&](Segment a, Segment b) {
202-
return segmentOrdinals_[a] < segmentOrdinals_[b];
202+
return segmentOrdinals_[a] < segmentOrdinals_[b]; //TODO will this be slow if ordinals moved to SegmentData?
203203
});
204204

205205
NTA_ASSERT(segmentOnCell != cellData.segments.end());

src/htm/algorithms/Connections.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#ifndef NTA_CONNECTIONS_HPP
2323
#define NTA_CONNECTIONS_HPP
2424

25-
#include <climits>
2625
#include <map>
2726
#include <unordered_map>
2827
#include <set>
@@ -39,7 +38,7 @@ namespace htm {
3938
//TODO instead of typedefs, use templates for proper type-checking?
4039
using CellIdx = htm::ElemSparse; // CellIdx must match with ElemSparse, defined in Sdr.hpp
4140
using SegmentIdx= UInt16; /** Index of segment in cell. */
42-
using SynapseIdx= UInt16; /** Index of synapse in segment. */ //TODO profile to use better (smaller?) types
41+
using SynapseIdx= UInt16; /** Index of synapse in segment. */
4342
using Segment = UInt32; /** Index of segment's data. */
4443
using Synapse = UInt32; /** Index of synapse's data. */
4544
using Permanence= Real32; //TODO experiment with half aka float16

src/htm/algorithms/SpatialPooler.cpp

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ void SpatialPooler::getConnectedSynapses(UInt column,
363363
void SpatialPooler::getConnectedCounts(UInt connectedCounts[]) const {
364364
for(UInt seg = 0; seg < numColumns_; seg++) {
365365
const auto &segment = connections_.dataForSegment( seg );
366-
connectedCounts[ seg ] = segment.numConnected;
366+
connectedCounts[ seg ] = segment.numConnected; //TODO numConnected only used here, rm from SegmentData and compute for each segment.synapses?
367367
}
368368
}
369369

@@ -398,7 +398,7 @@ void SpatialPooler::initialize(
398398
NTA_CHECK(numColumns_ > 0);
399399
NTA_CHECK(numInputs_ > 0);
400400

401-
// 1D input produces 1D output; 2D => 2D, etc.
401+
// 1D input produces 1D output; 2D => 2D, etc. //TODO allow nD -> mD conversion
402402
NTA_CHECK(inputDimensions_.size() == columnDimensions_.size());
403403

404404
NTA_CHECK((numActiveColumnsPerInhArea > 0 && localAreaDensity < 0) ||
@@ -429,12 +429,7 @@ void SpatialPooler::initialize(
429429
iterationNum_ = 0u;
430430
iterationLearnNum_ = 0u;
431431

432-
tieBreaker_.resize(numColumns_);
433-
for (Size i = 0; i < numColumns_; i++) {
434-
tieBreaker_[i] = (Real)(0.01 * rng_.getReal64());
435-
}
436-
437-
overlapDutyCycles_.assign(numColumns_, 0);
432+
overlapDutyCycles_.assign(numColumns_, 0); //TODO make all these sparse or rm to reduce footprint
438433
activeDutyCycles_.assign(numColumns_, 0);
439434
minOverlapDutyCycles_.assign(numColumns_, 0.0);
440435
boostFactors_.assign(numColumns_, 1);
@@ -837,11 +832,6 @@ void SpatialPooler::inhibitColumnsGlobal_(const vector<Real> &overlaps,
837832
NTA_ASSERT(!overlaps.empty());
838833
NTA_ASSERT(density > 0.0f && density <= 1.0f);
839834

840-
// Add a tiebreaker to the overlaps so that the output is deterministic.
841-
vector<Real> overlaps_(overlaps.begin(), overlaps.end());
842-
for(UInt i = 0; i < numColumns_; i++)
843-
overlaps_[i] += tieBreaker_[i];
844-
845835
activeColumns.clear();
846836
const UInt numDesired = (UInt)(density * numColumns_);
847837
NTA_CHECK(numDesired > 0) << "Not enough columns (" << numColumns_ << ") "
@@ -852,8 +842,10 @@ void SpatialPooler::inhibitColumnsGlobal_(const vector<Real> &overlaps,
852842
for(UInt i = 0; i < numColumns_; i++)
853843
activeColumns.push_back(i);
854844
// Compare the column indexes by their overlap.
855-
auto compare = [&overlaps_](const UInt &a, const UInt &b) -> bool
856-
{return (overlaps_[a] == overlaps_[b]) ? a > b : overlaps_[a] > overlaps_[b];};
845+
auto compare = [&overlaps](const UInt &a, const UInt &b) -> bool
846+
{return (overlaps[a] == overlaps[b]) ? a > b : overlaps[a] > overlaps[b];}; //for determinism if overlaps match (tieBreaker does not solve that),
847+
//otherwise we'd return just `return overlaps[a] > overlaps[b]`.
848+
857849
// Do a partial sort to divide the winners from the losers. This sort is
858850
// faster than a regular sort because it stops after it partitions the
859851
// elements about the Nth element, with all elements on their correct side of
@@ -1026,7 +1018,6 @@ bool SpatialPooler::operator==(const SpatialPooler& o) const{
10261018
if (overlapDutyCycles_ != o.overlapDutyCycles_) return false;
10271019
if (activeDutyCycles_ != o.activeDutyCycles_) return false;
10281020
if (minOverlapDutyCycles_ != o.minOverlapDutyCycles_) return false;
1029-
if (tieBreaker_ != o.tieBreaker_) return false;
10301021

10311022
// compare connections
10321023
if (connections_ != o.connections_) return false;

src/htm/algorithms/SpatialPooler.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ class SpatialPooler : public Serializable
287287
ar(CEREAL_NVP(overlapDutyCycles_));
288288
ar(CEREAL_NVP(activeDutyCycles_));
289289
ar(CEREAL_NVP(minOverlapDutyCycles_));
290-
ar(CEREAL_NVP(tieBreaker_));
291290
ar(CEREAL_NVP(connections_));
292291
ar(CEREAL_NVP(rng_));
293292
}
@@ -322,7 +321,6 @@ class SpatialPooler : public Serializable
322321
ar(CEREAL_NVP(overlapDutyCycles_));
323322
ar(CEREAL_NVP(activeDutyCycles_));
324323
ar(CEREAL_NVP(minOverlapDutyCycles_));
325-
ar(CEREAL_NVP(tieBreaker_));
326324
ar(CEREAL_NVP(connections_));
327325
ar(CEREAL_NVP(rng_));
328326

@@ -1229,7 +1227,6 @@ class SpatialPooler : public Serializable
12291227

12301228
vector<SynapseIdx> overlaps_;
12311229
vector<Real> boostedOverlaps_;
1232-
vector<Real> tieBreaker_;
12331230

12341231

12351232
UInt version_;

src/htm/algorithms/TemporalMemory.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,13 @@ class TemporalMemory : public Serializable
104104
*
105105
* @param maxSegmentsPerCell
106106
* The maximum number of segments per cell.
107+
* The value you can choose here is limited by the type SegmentIdx
108+
* in Connections.hpp, change it if you need larger values.
107109
*
108110
* @param maxSynapsesPerSegment
109111
* The maximum number of synapses per segment.
112+
* The value you can choose here is limited by the type SynapseIdx
113+
* in Connections.hpp, change it there if you needed to use large values.
110114
*
111115
* @param checkInputs
112116
* Whether to check that the activeColumns are sorted without

src/htm/utils/VectorHelpers.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class VectorHelpers
2626
{
2727
std::vector<T> binary(width);
2828
for (auto sparseIdx: sparseVector) {
29+
NTA_ASSERT(sparseIdx < binary.size()) << "attemping to insert out of bounds element! " << sparseIdx;
2930
binary[sparseIdx] = (T)1;
3031
}
3132
return binary;

src/test/unit/algorithms/SpatialPoolerTest.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,7 @@ TEST(SpatialPoolerTest, ZeroOverlap_NoStimulusThreshold_LocalInhibition) {
17741774
SDR activeColumns( {nColumns} );
17751775
sp.compute(input, true, activeColumns);
17761776

1777-
EXPECT_EQ(activeColumns.getSum(), 4u);
1777+
EXPECT_EQ(activeColumns.getSum(), 3u);
17781778
}
17791779

17801780
TEST(SpatialPoolerTest, ZeroOverlap_StimulusThreshold_LocalInhibition) {
@@ -2037,14 +2037,16 @@ TEST(SpatialPoolerTest, testConstructorVsInitialize) {
20372037
TEST(SpatialPoolerTest, ExactOutput) {
20382038
// Silver is an SDR that is loaded by direct initalization from a vector.
20392039
SDR silver_sdr({ 200 });
2040-
SDR_sparse_t data = {23, 71, 113, 118, 129, 172, 178, 182, 185, 190};
2040+
SDR_sparse_t data = {
2041+
4, 64, 74, 78, 85, 113, 125, 126, 127, 153
2042+
};
20412043
silver_sdr.setSparse(data);
20422044

20432045

20442046
// Gold tests initalizing an SDR from a manually created string in JSON format.
20452047
// hint: you can generate this string using
20462048
// silver_sdr.save(std::cout, JSON);
2047-
string gold = "{\"dimensions\": [200],\"sparse\": [23,71,113,118,129,172,178,182,185,190]}";
2049+
string gold = "{\"dimensions\": [200],\"sparse\": [4, 64, 74, 78, 85, 113, 125, 126, 127, 153]}";
20482050
std::stringstream gold_stream( gold );
20492051
SDR gold_sdr;
20502052
gold_sdr.load( gold_stream, JSON );

src/test/unit/engine/CppRegionTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ TEST(CppRegionTest, testCppLinkingSDR) {
149149

150150
const Array r2OutputArray = region2->getOutputData("bottomUpOut");
151151
EXPECT_EQ(r2OutputArray.getType(), NTA_BasicType_SDR);
152-
EXPECT_TRUE(r2OutputArray.getSDR().dimensions == r2dims)
152+
EXPECT_EQ(r2OutputArray.getSDR().dimensions, r2dims)
153153
<< "Expected dimensions on the output to match dimensions on the buffer.";
154154
VERBOSE << r2OutputArray << "\n";
155-
std::vector<Byte> expected_output = {0, 1, 0, 1, 0, 1};
156-
EXPECT_TRUE(r2OutputArray == expected_output);
155+
std::vector<Byte> expected_output = {1, 0, 1, 0, 1, 0};
156+
EXPECT_TRUE(r2OutputArray == expected_output) << "expected " << r2OutputArray;
157157

158158
}
159159

src/test/unit/regions/TMRegionTest.cpp

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,10 @@ TEST(TMRegionTest, testLinking) {
272272
EXPECT_TRUE(r3InputArray.getType() == NTA_BasicType_SDR);
273273
VERBOSE << " " << r3InputArray << "\n";
274274
std::vector<Byte> expected3in = VectorHelpers::sparseToBinary<Byte>(
275-
{ 1, 2, 3, 5, 6, 8, 11, 13, 17, 19 }, (UInt32)r3InputArray.getCount());
276-
EXPECT_TRUE(r3InputArray == expected3in);
275+
{
276+
0, 2, 3, 4, 6, 7, 10, 11, 14, 17
277+
}, (UInt32)r3InputArray.getCount());
278+
EXPECT_TRUE(r3InputArray == expected3in) << r3InputArray;
277279

278280
VERBOSE << " TMRegion output "
279281
<< region3->getOutputDimensions("bottomUpOut") << "\n";
@@ -287,12 +289,13 @@ TEST(TMRegionTest, testLinking) {
287289
<< r3InputArray.getCount();
288290
EXPECT_TRUE(r3OutputArray.getType() == NTA_BasicType_SDR);
289291
VERBOSE << " " << r3OutputArray << "\n";
290-
std::vector<Byte> expected3out = VectorHelpers::sparseToBinary<Byte>(
291-
{ 5u, 6u, 7u, 8u, 9u, 10u, 11u, 12u, 13u, 14u, 15u, 16u, 17u, 18u, 19u,
292-
25u, 26u, 27u, 28u, 29u, 30u, 31u, 32u, 33u, 34u, 40u, 41u, 42u, 43u,
293-
44u, 55u, 56u, 57u, 58u, 59u, 65u, 66u, 67u, 68u, 69u, 85u, 86u, 87u,
294-
88u, 89u, 95u, 96u, 97u, 98u, 99u }, (UInt32)r3OutputArray.getCount());
295-
EXPECT_TRUE(r3OutputArray == expected3out);
292+
std::vector<Byte> expected3out = VectorHelpers::sparseToBinary<Byte>( //TODO replace with SDR
293+
{
294+
0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 30,
295+
31, 32, 33, 34, 35, 36, 37, 38, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 70,
296+
71, 72, 73, 74, 85, 86, 87, 88, 89
297+
}, (UInt32)r3OutputArray.getCount());
298+
EXPECT_TRUE(r3OutputArray == expected3out) << r3OutputArray;
296299
EXPECT_EQ(r3OutputArray.getSDR().getSparse().size(), 50u);
297300

298301
// execute TMRegion several more times and check that it has output.
@@ -308,19 +311,20 @@ TEST(TMRegionTest, testLinking) {
308311
<< numberOfCols << " * " << cellsPerColumn;
309312
VERBOSE << " " << r3OutputArray << ")\n";
310313
std::vector<Byte> expected3outa = VectorHelpers::sparseToBinary<Byte>(
311-
{20u, 21u, 22u, 23u, 24u, 25u, 26u, 27u, 28u, 29u, 35u, 36u, 37u, 38u,
312-
39u, 45u, 46u, 47u, 48u, 49u, 50u, 51u, 52u, 53u, 54u, 60u, 61u, 62u,
313-
63u, 64u, 70u, 71u, 72u, 73u, 74u, 80u, 81u, 82u, 83u, 84u, 90u, 91u,
314-
92u, 93u, 94u, 95u, 96u, 97u, 98u, 99u}, (UInt32)r3OutputArray.getCount());
315-
EXPECT_TRUE(r3OutputArray == expected3outa);
314+
{
315+
10, 11, 12, 13, 14, 30, 31, 32, 33, 34, 45, 46, 47, 48, 49, 55, 56, 57, 58,
316+
59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 80, 81, 82, 83, 84, 85, 86, 87,
317+
88, 89, 90, 91, 92,93, 94, 95, 96, 97, 98, 99
318+
}, (UInt32)r3OutputArray.getCount());
319+
EXPECT_TRUE(r3OutputArray == expected3outa) << r3OutputArray;
316320

317321

318322
VERBOSE << " Input to VectorFileEffector "
319323
<< region4->getInputDimensions("dataIn") << "\n";
320324
Array r4InputArray = region4->getInputData("dataIn");
321325
EXPECT_TRUE(r4InputArray.getType() == NTA_BasicType_Real32);
322326
VERBOSE << " " << r4InputArray << "\n";
323-
EXPECT_TRUE(r4InputArray == expected3outa);
327+
EXPECT_TRUE(r4InputArray == expected3outa) << r4InputArray;
324328

325329
// cleanup
326330
region3->executeCommand({"closeFile"});

0 commit comments

Comments
 (0)