multithreading - c++ Armadillo matrix circular buffer and row assignment -
i'm trying populate arma::mat data_mat(n,n) streaming data of size n in each time step. high frequency real time system. so, efficiency , thread safety important design goals. in mind, 1) best (efficient,threadsafe) way populate data_mat vector (double/float) in each time step until finished populating n rows. 2)after n rows populated,the rows should circularly buffered row elements being shifted upward or downward.
i tried data_mat.row(i)=vec however,i'm not sure if efficient way. , i'm emulating circular buffer copying in loop guess not efficient. advice highly appreciated.
Comments
Post a Comment