From 2f7b254600b063407e6f60a9733c34cace25290b Mon Sep 17 00:00:00 2001 From: Elias Stehle <3958403+elstehle@users.noreply.github.com> Date: Thu, 31 Mar 2022 04:11:44 -0700 Subject: [PATCH] Added utility to debug print & instrumented code to use it --- cpp/src/io/fst/logical_stack.cuh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpp/src/io/fst/logical_stack.cuh b/cpp/src/io/fst/logical_stack.cuh index 5149ade7c1c..03a8fdadc1f 100644 --- a/cpp/src/io/fst/logical_stack.cuh +++ b/cpp/src/io/fst/logical_stack.cuh @@ -438,6 +438,14 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, get_stack_level_iterator(d_kv_operations.Current()), get_value_iterator(d_kv_operations.Current())); + // Dump info on stack operations: (stack level change + symbol) -> (absolute stack level + symbol) + test::print::print_array(num_symbols_in, + stream, + get_key_it(stack_symbols_in), + get_value_it(stack_symbols_in), + get_key_it(d_kv_operations.Current()), + get_value_it(d_kv_operations.Current())); + // Stable radix sort, sorting by stack level of the operations d_kv_operations_unsigned = cub::DoubleBuffer{ reinterpret_cast(d_kv_operations.Current()),