Faster way to read a data file using armadilo in C++

一世执手 提交于 2019-12-13 18:04:25

问题


Hi I just recently discovered the armadillo library for C++ and I quite like it. I am building an application after prototyping it in MATLAB so that I can execute it much faster. The problem I am facing is that when I try to load a matrix from a .mat file as follows:

A.load("A.mat",raw_ascii); 
//raw_ascii because I can port data to MATLAB as well. 

it takes about 10 seconds. I was wondering if there was a faster way of doing it in armadillo or C++ in general.

Any thoughts are much appreciated, thanks.

edit 1 - the file I am trying to read is about 35MB.


回答1:


hdf5_binary should work faster. Matlab supports this format



来源:https://stackoverflow.com/questions/15581131/faster-way-to-read-a-data-file-using-armadilo-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!