8#include "CombBLAS/CombBLAS.h"
16template <
unsigned int IDLEN,
unsigned int SEQLEN>
21 ShortRead(
const string & s_id,
const string & s_seq,
const string & s_qual)
24 s_seq.copy(
seq, SEQLEN);
25 s_qual.copy(qual, SEQLEN);
31 template <
unsigned int NS_IDLEN,
unsigned int NS_SEQLEN>
39 template <
typename IT,
unsigned int NS_IDLEN,
unsigned int NS_SEQLEN>
43template <
unsigned int IDLEN,
unsigned int SEQLEN>
46 os << sread.id <<
" " << sread.seq <<
" " << sread.qual << endl;
51template <
class IT,
unsigned int IDLEN,
unsigned int SEQLEN>
65 size_t entryLength = fread (&ind,
sizeof(ind),1,rFile);
68 cout <<
"Not enough bytes read in binaryfill " << endl;
72 template <
typename c,
typename t>
75 string s_id, s_seq, s_qual, s_null;
84 template <
typename c,
typename t>
93int main(
int argc,
char* argv[])
96 MPI_Init(&argc, &argv);
97 MPI_Comm_size(MPI_COMM_WORLD,&
nprocs);
98 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
104 cout <<
"Usage: ./VectorIOPermute <VectorFile>" << endl;
105 cout <<
"<VectorFile> is a binary file" << endl;
void binaryfill(FILE *rFile, IT &ind, ShortRead< IDLEN, SEQLEN > &val)
ShortRead< IDLEN, SEQLEN > getNoNum(IT ind)
ShortRead< IDLEN, SEQLEN > read(std::basic_istream< c, t > &is, IT ind)
void save(std::basic_ostream< c, t > &os, const ShortRead< IDLEN, SEQLEN > &tw, IT ind)
MPI_Datatype getMPIType()
friend ostream & operator<<(ostream &os, const ShortRead< NS_IDLEN, NS_SEQLEN > &sread)
friend class ShortReadSaveHandler
ShortRead(const string &s_id, const string &s_seq, const string &s_qual)
std::ofstream & operator<<(std::ofstream &outfile, const SpMat< UIT, UNT, UDER > &s)
MPI_Datatype MPIType(void)
Collection of Generic Sequential Functions.