@@ -42,66 +42,65 @@ int scc_cover [7] = { 0, 0, 2, 0, 4, 2, 0 } ;
4242
4343const matrix_info files [ ] =
4444{
45- { "A2.mtx" , 1 , 6493938657738929428ull },
46- { "A.mtx" , 1 , 6493938657738929428ull },
47- { "bcsstk13.mtx" , 1 , 4873650117803742346ull },
48- { "cover.mtx" , 3 , 848279640410529436ull },
49- { "cover_structure.mtx" , 3 , 848279640410529436ull },
50- { "cryg2500.mtx" , 1 , 8070599988610413093ull },
51- { "full.mtx" , 1 , 15769435293242772098ull },
52- { "full_noheader.mtx" , 1 , 15769435293242772098ull },
53- { "full_symmetric.mtx" , 1 , 7920595475144714245ull },
54- { "jagmesh7.mtx" , 1 , 5114200449021899176ull },
55- { "karate.mtx" , 1 , 4176608668907330736ull },
56- { "ldbc-cdlp-directed-example.mtx" , 2 , 11183292771650049706ull },
57- { "ldbc-cdlp-undirected-example.mtx" , 1 , 4918287057298807835ull },
58- { "ldbc-directed-example-bool.mtx" , 7 , 11304580677056001228ull },
59- { "ldbc-directed-example.mtx" , 7 , 11304580677056001228ull },
60- { "ldbc-directed-example-unweighted.mtx" , 7 , 11304580677056001228ull },
61- { "ldbc-undirected-example-bool.mtx" , 1 , 9158223257798130275ull },
62- { "ldbc-undirected-example.mtx" , 1 , 9158223257798130275ull },
63- { "ldbc-undirected-example-unweighted.mtx" , 1 , 9158223257798130275ull },
64- { "ldbc-wcc-example.mtx" , 1 , 4317729120311459500ull },
65- { "LFAT5.mtx" , 3 , 17553140753101484131ull },
66- { "LFAT5_two.mtx" , 6 , 7979561620824911ull },
67- { "matrix_bool.mtx" , 3 , 848279640410529436ull },
68- { "matrix_fp32.mtx" , 3 , 848279640410529436ull },
69- { "matrix_fp32_structure.mtx" , 3 , 848279640410529436ull },
70- { "matrix_fp64.mtx" , 3 , 848279640410529436ull },
71- { "matrix_int16.mtx" , 3 , 848279640410529436ull },
72- { "matrix_int32.mtx" , 3 , 848279640410529436ull },
73- { "matrix_int64.mtx" , 3 , 848279640410529436ull },
74- { "matrix_int8.mtx" , 3 , 848279640410529436ull },
75- { "matrix_uint16.mtx" , 3 , 848279640410529436ull },
76- { "matrix_uint32.mtx" , 3 , 848279640410529436ull },
77- { "matrix_uint64.mtx" , 3 , 848279640410529436ull },
78- { "matrix_uint8.mtx" , 3 , 848279640410529436ull },
79- { "msf1.mtx" , 4 , 3301616701375337755ull },
80- { "msf2.mtx" , 8 , 11227097946539390519ull },
81- { "msf3.mtx" , 5 , 5965767602828141907ull },
82- { "olm1000.mtx" , 1 , 14473458856538426155ull },
83- { "pushpull.mtx" , 1 , 14764381483900318255ull },
84- { "sample2.mtx" , 1 , 4918287057298807835ull },
85- { "sample.mtx" , 8 , 11227097946539390519ull },
86- { "structure.mtx" , 3 , 848279640410529436ull },
87- { "test_BF.mtx" , 3 , 848279640410529436ull },
88- { "test_FW_1000.mtx" , 1 , 14473458856538426155ull },
89- { "test_FW_2003.mtx" , 485 , 13924889949050000093ull },
90- { "test_FW_2500.mtx" , 646 , 9579946550331191330ull },
91- { "tree-example.mtx" , 1 , 16959292359894689422ull },
92- { "west0067_jumbled.mtx" , 1 , 15563611237648677666ull },
93- { "west0067.mtx" , 1 , 15563611237648677666ull },
94- { "west0067_noheader.mtx" , 1 , 15563611237648677666ull },
95- { "zenios.mtx" , 1391 , 10773678236411609506ull },
45+ { "A2.mtx" , 1 , 0x2de8d717be626313 },
46+ { "A.mtx" , 1 , 0x2de8d717be626313 },
47+ { "bcsstk13.mtx" , 1 , 0x41d903f08b46b543 },
48+ { "cover.mtx" , 3 , 0x30ae8cb78a807691 },
49+ { "cover_structure.mtx" , 3 , 0x30ae8cb78a807691 },
50+ { "cryg2500.mtx" , 1 , 0xd1cb8e3cc6be967 },
51+ { "full.mtx" , 1 , 0x99971e4f016b4644 },
52+ { "full_noheader.mtx" , 1 , 0x99971e4f016b4644 },
53+ { "full_symmetric.mtx" , 1 , 0x278859fec1de1f7f },
54+ { "jagmesh7.mtx" , 1 , 0x66b315eea17941c8 },
55+ { "karate.mtx" , 1 , 0x8bad7c50644c4aa9 },
56+ { "ldbc-cdlp-directed-example.mtx" , 2 , 0x3a61ac294b7bb114 },
57+ { "ldbc-cdlp-undirected-example.mtx" , 1 , 0x4072e255fd8e310a },
58+ { "ldbc-directed-example-bool.mtx" , 7 , 0xc66f5ecf1b7f6876 },
59+ { "ldbc-directed-example.mtx" , 7 , 0xc66f5ecf1b7f6876 },
60+ { "ldbc-directed-example-unweighted.mtx" , 7 , 0xc66f5ecf1b7f6876 },
61+ { "ldbc-undirected-example-bool.mtx" , 1 , 0xf53db7dbbeff3283 },
62+ { "ldbc-undirected-example.mtx" , 1 , 0xf53db7dbbeff3283 },
63+ { "ldbc-undirected-example-unweighted.mtx" , 1 , 0xf53db7dbbeff3283 },
64+ { "ldbc-wcc-example.mtx" , 1 , 0x36a78022528a2101 },
65+ { "LFAT5.mtx" , 3 , 0x79d4d8de0a22a863 },
66+ { "LFAT5_two.mtx" , 6 , 0xac369d0362d73d6 },
67+ { "matrix_bool.mtx" , 3 , 0x30ae8cb78a807691 },
68+ { "matrix_fp32.mtx" , 3 , 0x30ae8cb78a807691 },
69+ { "matrix_fp32_structure.mtx" , 3 , 0x30ae8cb78a807691 },
70+ { "matrix_fp64.mtx" , 3 , 0x30ae8cb78a807691 },
71+ { "matrix_int16.mtx" , 3 , 0x30ae8cb78a807691 },
72+ { "matrix_int32.mtx" , 3 , 0x30ae8cb78a807691 },
73+ { "matrix_int64.mtx" , 3 , 0x30ae8cb78a807691 },
74+ { "matrix_int8.mtx" , 3 , 0x30ae8cb78a807691 },
75+ { "matrix_uint16.mtx" , 3 , 0x30ae8cb78a807691 },
76+ { "matrix_uint32.mtx" , 3 , 0x30ae8cb78a807691 },
77+ { "matrix_uint64.mtx" , 3 , 0x30ae8cb78a807691 },
78+ { "matrix_uint8.mtx" , 3 , 0x30ae8cb78a807691 },
79+ { "msf1.mtx" , 4 , 0x6445d984131a9555 },
80+ { "msf2.mtx" , 8 , 0x72d532720c54b673 },
81+ { "msf3.mtx" , 5 , 0xf57eb057beb5a5c7 },
82+ { "olm1000.mtx" , 1 , 0x15cf9ea2db88ab18 },
83+ { "pushpull.mtx" , 1 , 0x1816384cd04f7e01 },
84+ { "sample2.mtx" , 1 , 0x4072e255fd8e310a },
85+ { "sample.mtx" , 8 , 0x72d532720c54b673 },
86+ { "structure.mtx" , 3 , 0x30ae8cb78a807691 },
87+ { "test_BF.mtx" , 3 , 0x30ae8cb78a807691 },
88+ { "test_FW_1000.mtx" , 1 , 0x15cf9ea2db88ab18 },
89+ { "test_FW_2003.mtx" , 485 , 0xf79ad45d3a704eec },
90+ { "test_FW_2500.mtx" , 646 , 0x4fa83d60352e7e19 },
91+ { "tree-example.mtx" , 1 , 0x8857b82baeba129 },
92+ { "west0067_jumbled.mtx" , 1 , 0xa861dc7526128ac7 },
93+ { "west0067.mtx" , 1 , 0xa861dc7526128ac7 },
94+ { "west0067_noheader.mtx" , 1 , 0xa861dc7526128ac7 },
95+ { "zenios.mtx" , 1391 , 0x15b2b99a80c3480e },
9696 { "" , 0 , 0 },
9797} ;
98+
9899//------------------------------------------------------------------------------
99100// count_connected_components: count the # of components in a component vector
100101//------------------------------------------------------------------------------
101102
102- int count_connected_components (GrB_Vector C , uint64_t * vector_hash ) ;
103-
104- int count_connected_components (GrB_Vector C , uint64_t * vector_hash )
103+ int count_connected_components (GrB_Vector C )
105104{
106105 GrB_Index n = 0 ;
107106 OK (GrB_Vector_size (& n , C )) ;
@@ -111,12 +110,6 @@ int count_connected_components (GrB_Vector C, uint64_t *vector_hash)
111110 int64_t comp = -1 ;
112111 int result = GrB_Vector_extractElement (& comp , C , i ) ;
113112 if (result == GrB_SUCCESS && comp == i ) ncomponents ++ ;
114- //hash all of the values into one number
115- if (result == GrB_SUCCESS && vector_hash )
116- {
117- (* vector_hash ) *= 89734512321ull ;
118- (* vector_hash ) += comp + i ;
119- }
120113 }
121114 return (ncomponents ) ;
122115}
@@ -173,15 +166,13 @@ void test_scc (void)
173166 TEST_CHECK (ok ) ;
174167 OK (GrB_free (& cgood )) ;
175168 }
176- uint64_t hash = 9238018047ull ;
177- int result_cc_count = count_connected_components (c , & hash );
169+ int result_cc_count = count_connected_components (c );
178170 TEST_CHECK (result_cc_count == files [k ].cc_count );
179- TEST_CHECK (hash == files [k ].hash );
180171 OK (LAGraph_Vector_Print (c , pr , stdout , msg )) ;
181- uint64_t hash2 ;
182- int hash_info = LAGraph_Hash_Vector (& hash2 , c , msg );
172+ uint64_t hash = 0 ;
173+ int hash_info = LAGraph_Hash_Vector (& hash , c , msg );
183174 OK (hash_info );
184- printf ( "%lx\n" , hash2 );
175+ TEST_CHECK ( hash == files [ k ]. hash );
185176 OK (GrB_free (& c )) ;
186177 }
187178 OK (GrB_free (& A )) ;
0 commit comments