From bea2a02226314cddb6073726d2feafa21d89bb52 Mon Sep 17 00:00:00 2001 From: Elias Stehle <3958403+elstehle@users.noreply.github.com> Date: Fri, 15 Jul 2022 01:54:20 -0700 Subject: [PATCH] replaces vanilla loop with iota --- cpp/src/io/fst/agent_dfa.cuh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/src/io/fst/agent_dfa.cuh b/cpp/src/io/fst/agent_dfa.cuh index 788e455592b..77f04555dc8 100644 --- a/cpp/src/io/fst/agent_dfa.cuh +++ b/cpp/src/io/fst/agent_dfa.cuh @@ -19,6 +19,9 @@ #include +#include +#include + namespace cudf::io::fst::detail { /// Type used to enumerate (and index) into the states defined by a DFA @@ -519,10 +522,7 @@ __launch_bounds__(int32_t(AgentDFAPolicy::BLOCK_THREADS)) __global__ std::array 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(symbol_matcher,