class nbla::ScanSetup

class ScanSetup

Scan configulation class.

size_input: Total size of the input. size_outer: Total product of input_shape[0:axis-1] size_scan: input_shape[axis] size_innter: Total product of inpute_shape[axis+1:] e.g. For the input_shape == (2, 3, 5, 7) and axis == 2 size_input: 210 size_outer: 6 size_scan: 5 size_inner: 7

axis: Axis scan will be performed.

exclusive: output[i] includes input[i] or not. e.g.) exclusive == false: [1, 2, 3, 4] -> [1, 3, 6, 10] e.g.) exclusive == true: [1, 2, 3, 4] -> [0, 1, 3, 6]

reverse: Scan direction. e.g.) reverse == false: [1, 2, 3, 4] -> [1, 3, 6, 10] e.g.) reverse == true: [1, 2, 3, 4] -> [10, 9, 7, 4]

require_64bit_index: Whether 64bit integer is needed for indexing or size description.

Public Functions

void operator()(const Shape_t &shape_input, const int axis, const bool exclusive, const bool reverse)

Initialize member variables from input_shape and other scan conditions.