Skip to content

Commit

Permalink
replaces vanilla loop with iota
Browse files Browse the repository at this point in the history
  • Loading branch information
elstehle committed Jul 15, 2022
1 parent cba1619 commit bea2a02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/src/io/fst/agent_dfa.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

#include <cub/cub.cuh>

#include <thrust/execution_policy.h>
#include <thrust/sequence.h>

namespace cudf::io::fst::detail {

/// Type used to enumerate (and index) into the states defined by a DFA
Expand Down Expand Up @@ -519,10 +522,7 @@ __launch_bounds__(int32_t(AgentDFAPolicy::BLOCK_THREADS)) __global__
std::array<StateIndexT, NUM_STATES> state_vector;

// Initialize the seed state transition vector with the identity vector
#pragma unroll
for (int32_t i = 0; i < NUM_STATES; ++i) {
state_vector[i] = i;
}
thrust::sequence(thrust::seq, std::begin(state_vector), std::end(state_vector));

// Compute the state transition vector
agent_dfa.GetThreadStateTransitionVector<NUM_STATES>(symbol_matcher,
Expand Down

0 comments on commit bea2a02

Please sign in to comment.