I want to read a file which contains a batch of strings like this:
TGCCACAGGTTCCACACAACGGGACTTGGTTGAAATATTGAGATCCTTGGGGGTCTGT GTTCACGGGCCTCACGCAACGGGGCCTGGCCTAGATATTGAGGCACCCAACAGCTCT TGCCACAGGTTCCACACAACGGGACTTGGTTGAAATATTGAGATCCTTGGGGGTCTGT TGCCACAGGTTCCACACAACGGGACTTGGTTGAAATATTGAGATCCTTGGGGGTCTGT TTCCACGGACTTCACGCAACGGAACTTGGTCTAGCGGCTGAGGTATCCAACAGCTCTT
......
The serial method to do this:
ifstream input_subset("subset.txt");
thrust::host_vector < string > h_output_subset;
string s;
while (getline(input_subset, s)) {
h_output_subset.push_back(s);
}
Is that possible to fill host_vector in a parallel way by using some thrust function or implements it in a CUDA project? I mean batch filling, say, one thread fills one cell of a vector at the same time.
thx a lot.