MCPcopy Create free account
hub / github.com/clMathLibraries/clSPARSE / MMReadHeader

Method MMReadHeader

src/benchmarks/cusparse-bench/src/mm_reader.cpp:125–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123
124template<typename FloatType>
125bool MatrixMarketReader<FloatType>::MMReadHeader( FILE* mm_file )
126{
127 int status = MMReadBanner( mm_file );
128 if( status != 0 )
129 {
130 printf( "Error Reading Banner in Matrix-Market File !\n" );
131 return 1;
132 }
133
134 if( !mm_is_coordinate( Typecode ) )
135 {
136 printf( "Handling only coordinate format\n" ); return( 1 );
137 }
138
139 if( mm_is_complex( Typecode ) )
140 {
141 printf( "Error: cannot handle complex format\n" );
142 return ( 1 );
143 }
144
145 if( mm_is_symmetric( Typecode ) )
146 isSymmetric = 1;
147
148 status = MMReadMtxCrdSize( mm_file );
149 if( status != 0 )
150 {
151 printf( "Error reading Matrix Market crd_size %d\n", status );
152 return( 1 );
153 }
154
155 return 0;
156}
157
158template<typename FloatType>
159bool MatrixMarketReader<FloatType>::MMReadHeader( const std::string &filename )

Callers 1

sparseHeaderfromFileFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected