Manipulating row, columns of dense<f32,2>

Manipulating row, columns of dense

HiI am using dense vector and i try to fill row or columns without _for nest in order to get parallelization:For exemple is it possible to fill a row or column with a given value :dense a;a(0, all) = val ; // all for all elements of row 0If yes is it possible for a section :a(0,[1:3])= val ; //This possibility is available in all C++ libraries i use (eigen, blitz++).Thank you very much

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

To fill a row or a column, you can fill a 1D dense container, then use replace_row() or replace_column() to set the row or column into place. For example,

dense row = fill(1.0, LENGTH);
dense matrix(WIDTH, HEIGHT);
matrix = replace_row(matrix, row_id, row);

It is also possible to fill a section using replace(). For example,

dense section = fill(2.0, YSIZE, XSIZE);
dense matrix(WIDTH, HEIGHT);
matrix = replace(matrix, start_col, YSIZE, start_row, XSIZE, section);

Refer to the API reference manual here, here and here for details about replace_row(), replace_col(), and replace().

Thanks.

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen