35 template <
typename range_type>
45 template <
typename index_type,
typename string_set_type>
56 const index_type _index,
57 const string_set_type _string_set) :
65 typedef typename string_set_type::string_type string_type;
78 template <
typename range_type>
91 const range_type* _ranges) :
110 const range_type range =
ranges[ slot ];
111 const uint64 base_slot = slot ?
slots[ slot-1 ] : 0u;
112 const uint32 local_index = output_index - base_slot;
123 template <
typename index_type>
145 template <
typename index_type>
167 template <
typename index_type>
200 template <
typename fm_index_type>
201 template <
typename string_set_type>
203 const fm_index_type& index,
204 const string_set_type& string_set)
207 m_n_queries = string_set.size();
211 m_ranges.resize( m_n_queries );
212 m_slots.resize( m_n_queries );
216 thrust::make_counting_iterator<uint32>(0u),
217 thrust::make_counting_iterator<uint32>(0u) + m_n_queries,
228 m_n_occurrences = m_slots[ m_n_queries-1 ];
229 return m_n_occurrences;
236 template <
typename fm_index_type>
237 template <
typename hits_iterator>
245 thrust::make_counting_iterator<uint64>(0u) + begin,
246 thrust::make_counting_iterator<uint64>(0u) + end,
256 hits + (end - begin),
268 template <
typename fm_index_type>
269 template <
typename string_set_type>
271 const fm_index_type& index,
272 const string_set_type& string_set)
275 m_n_queries = string_set.size();
279 m_ranges.resize( m_n_queries );
280 m_slots.resize( m_n_queries );
284 thrust::make_counting_iterator<uint32>(0u),
285 thrust::make_counting_iterator<uint32>(0u) + m_n_queries,
294 thrust::plus<uint64>(),
298 m_n_occurrences = m_slots[ m_n_queries-1 ];
299 return m_n_occurrences;
306 template <
typename fm_index_type>
307 template <
typename hits_iterator>
315 const uint32 buffer_size = align<32>( n_hits );
317 if (m_hits.size() < buffer_size * 2u)
320 m_hits.resize( buffer_size * 2u );
325 thrust::make_counting_iterator<uint64>(0u) + begin,
326 thrust::make_counting_iterator<uint64>(0u) + end,
337 sort_buffers.
keys[0] = raw_hits;
338 sort_buffers.
keys[1] = raw_hits + buffer_size;
341 sort_enactor.
sort( n_hits, sort_buffers, 0u, 8u );
348 m_hits.begin() + buffer_size * pairs_selector,
349 m_hits.begin() + buffer_size * pairs_selector + n_hits,
350 m_hits.begin() + buffer_size * ssa_selector,
355 m_hits.begin() + buffer_size * pairs_selector,
356 m_hits.begin() + buffer_size * pairs_selector + n_hits,
357 m_hits.begin() + buffer_size * ssa_selector,
358 m_hits.begin() + buffer_size * pairs_selector,
362 sort_enactor.
sort( n_hits, sort_buffers, 32u, 64u );
365 m_hits.begin() + buffer_size * sort_buffers.
selector,
366 m_hits.begin() + buffer_size * sort_buffers.
selector + n_hits,
371 if (m_hits.size() < n_hits)
374 m_hits.resize( n_hits );
379 thrust::make_counting_iterator<uint64>(0u) + begin,
380 thrust::make_counting_iterator<uint64>(0u) + end,