Skip to content

Commit d7dab65

Browse files
committed
Make sliding_window.cpp diffs easier for git diff views
Signed-off-by: Chuck Ketcham <[email protected]>
1 parent 9bb39a4 commit d7dab65

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

libs/qec/lib/decoders/sliding_window.cpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414

1515
namespace cudaq::qec {
1616

17-
// ============================================================================
18-
// Private helper method implementations
19-
// ============================================================================
20-
21-
/// Helper function to validate constructor inputs.
2217
void sliding_window::validate_inputs() {
2318
if (window_size < 1 || window_size > num_rounds) {
2419
throw std::invalid_argument(
@@ -180,11 +175,6 @@ void sliding_window::update_rw_next_read_index() {
180175
rw_next_read_index -= num_syndromes_per_window;
181176
}
182177

183-
// ============================================================================
184-
// Public method implementations
185-
// ============================================================================
186-
187-
/// Constructor for the sliding window decoder.
188178
sliding_window::sliding_window(const cudaqx::tensor<uint8_t> &H,
189179
const cudaqx::heterogeneous_map &params)
190180
: decoder(H), full_pcm(H) {
@@ -237,7 +227,6 @@ sliding_window::sliding_window(const cudaqx::tensor<uint8_t> &H,
237227
}
238228
}
239229

240-
/// Decode a syndrome vector (either full block or single round).
241230
decoder_result sliding_window::decode(const std::vector<float_t> &syndrome) {
242231
if (syndrome.size() == this->syndrome_size) {
243232
auto t0 = std::chrono::high_resolution_clock::now();
@@ -301,7 +290,6 @@ decoder_result sliding_window::decode(const std::vector<float_t> &syndrome) {
301290
return decoder_result(); // empty return value
302291
}
303292

304-
/// Decode a batch of syndrome vectors.
305293
std::vector<decoder_result> sliding_window::decode_batch(
306294
const std::vector<std::vector<float_t>> &syndromes) {
307295
if (syndromes[0].size() == this->syndrome_size) {
@@ -483,12 +471,12 @@ void sliding_window::decode_window() {
483471
window_proc_times_arr[7]);
484472
}
485473

474+
sliding_window::~sliding_window() {}
475+
486476
std::size_t sliding_window::get_num_syndromes_per_round() const {
487477
return num_syndromes_per_round;
488478
}
489479

490-
sliding_window::~sliding_window() {}
491-
492480
CUDAQ_REGISTER_TYPE(sliding_window)
493481

494482
} // namespace cudaq::qec

0 commit comments

Comments
 (0)