35 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
39 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
42 m_child( _child ), m_mask( _mask ), m_size(1u)
47 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
51 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
55 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
60 return m_child +
nvbio::popc( m_mask & ((1u << c)-1u) );
65 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
75 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
82 return m_child +
ffs( m_mask );
85 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
89 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
93 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
97 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
101 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
107 template <TrieType TYPE_T>
111 template <TrieType TYPE_T>
113 TrieNode5<TYPE_T>::TrieNode5(
const uint32 _child,
const uint32 _mask) :
114 m_child( _child ), m_mask( _mask ), m_size(1u)
119 template <TrieType TYPE_T>
123 template <TrieType TYPE_T>
127 template <TrieType TYPE_T>
132 return m_child +
nvbio::popc( m_mask & ((1u << c)-1u) );
137 template <TrieType TYPE_T>
147 template <TrieType TYPE_T>
154 return m_child +
ffs( m_mask );
157 template <TrieType TYPE_T>
161 template <TrieType TYPE_T>
165 template <TrieType TYPE_T>
169 template <TrieType TYPE_T>
173 template <TrieType TYPE_T>
181 template <u
int32 ALPHABET_SIZE_T,
typename NodeIterator>
189 template <u
int32 ALPHABET_SIZE_T,
typename NodeIterator>
199 template <u
int32 ALPHABET_SIZE_T,
typename NodeIterator>
200 template <
typename Visitor>
206 if (node.child_bit(c))
207 visitor.visit( c, node.child(c) );
211 template <u
int32 ALPHABET_SIZE_T,
typename NodeType>
229 template <u
int32 ALPHABET_SIZE_T, TrieType TYPE_T>
232 template <u
int32 ALPHABET_SIZE_T>
235 template <
typename InTrieType,
typename OutVectorType>
237 const InTrieType& in_trie,
238 const typename InTrieType::node_type in_node,
239 OutVectorType& out_nodes,
240 const uint32 out_node_index)
242 typedef typename InTrieType::node_type in_node_type;
245 if (in_trie.is_leaf( in_node ))
247 out_nodes[ out_node_index ].set_size( in_trie.size( in_node ) );
253 in_trie.children( in_node, children );
256 out_nodes.resize( child_offset + children.
count );
273 template <
typename TrieType,
typename NodeVector>
276 NodeVector& out_nodes)
278 typedef typename NodeVector::value_type out_node_type;
281 out_nodes.resize(1u);