MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / reshape_data

Method reshape_data

src/board_controller/board.cpp:489–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489void Board::reshape_data (int data_count, int preset, const double *buf, double *output_buf)
490{
491 std::string preset_str = preset_to_string (preset);
492 int num_rows = (int)board_descr[preset_str]["num_rows"];
493
494 for (int i = 0; i < data_count; i++)
495 {
496 for (int j = 0; j < num_rows; j++)
497 {
498 output_buf[j * data_count + i] = buf[i * num_rows + j];
499 }
500 }
501}
502
503std::string Board::preset_to_string (int preset)
504{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected