const input_idx_t SA[restrict],
input_idx_t n)
{
- input_idx_t i;
+ input_idx_t r;
- for (i = 0; i < n; i++)
- ISA[SA[i]] = i;
+ for (r = 0; r < n; r++)
+ ISA[SA[r]] = r;
}
return true;
}
+u64
+lz_sarray_get_needed_memory(input_idx_t max_window_size)
+{
+ return (u64)6 * sizeof(input_idx_t) * max_window_size;
+}
+
/*
* Prepare the suffix array match-finder to scan the specified window for
* matches.