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

Method MMReadHeader

src/library/io/mm-reader.cpp:140–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138
139template<typename FloatType>
140bool MatrixMarketReader<FloatType>::MMReadHeader( FILE* mm_file )
141{
142 int status = MMReadBanner( mm_file );
143 if( status != 0 )
144 {
145 printf( "Error Reading Banner in Matrix-Market File !\n" );
146 return 1;
147 }
148
149 if( !mm_is_coordinate( Typecode ) )
150 {
151 printf( "Handling only coordinate format\n" ); return( 1 );
152 }
153
154 if( mm_is_complex( Typecode ) )
155 {
156 printf( "Error: cannot handle complex format\n" );
157 return ( 1 );
158 }
159
160 if( mm_is_symmetric( Typecode ) )
161 isSymmetric = 1;
162
163 status = MMReadMtxCrdSize( mm_file );
164 if( status != 0 )
165 {
166 printf( "Error reading Matrix Market crd_size %d\n", status );
167 return( 1 );
168 }
169
170 return 0;
171}
172
173template<typename FloatType>
174bool MatrixMarketReader<FloatType>::MMReadHeader( const std::string &filename )

Callers 1

clsparseHeaderfromFileFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected