在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):tminka/lightspeed开源软件地址(OpenSource Url):https://github.com/tminka/lightspeed开源编程语言(OpenSource Language):MATLAB 61.6%开源软件介绍(OpenSource Introduction):Lightspeed matlab toolboxThis library provides:
See Contents.m for a table of contents. Also see my general tips on accelerating matlab. Flop countingMatlab is frequently used for research, so I have included routines that faciliate research. In particular, Lightspeed features a set of routines for accurate floating-point operation (flop) counting. These flop counts allow machine-independent and programmer-independent comparison of numerical algorithms, because they represent the minimal number of operations that the algorithm needs. Consequently, you can compare algorithms based on their Matlab implementations alone, without having to code them efficiently in C and report their run time on a particular processor. Hopefully these routines will allow more informative algorithm comparisons in research papers. The flop count routines in lightspeed are significantly more accurate than
the Perhaps the biggest difference between flop counting in lightspeed versus
Matlab 5 is the handling of special functions like Flop counting in lightspeed is a more manual process than in Matlab 5. In Matlab 5, the flop counter is incremented automatically after every operation. Lightspeed does not increment the flop counter automatically. Instead, you must specify which operations should have their flops counted. For example, after performing a matrix multiply you should call Manual flop counting has two advantages. First, it can be different from the operation that you actually performed, allowing you to count the flops for an `idealized' algorithm rather than the one you implemented. Second, since only the operations that you explicitly count get added to the flop counter, unrelated operations (such as debugging code) will not interfere with the result. Incrementing the flop counter on every operation can cause your code to run slower. To avoid this, you can batch up the count for many operations. For example, to get the flop count for a loop, you can save time by computing the flops for one iteration of the loop and then multiply by the number of iterations. For examples, see fastfit/dirichlet_fit_newton.m or logreg/train_cg.m. InstallationThe toolbox has been tested on all versions of Matlab from 6.5 to 8.4 with Windows XP, Vista, 7, and 8. It has been tested on 32-bit and 64-bit machines, with Microsoft Visual Studio 2008-2013 (Professional and Express Editions). It should work on Macs and Linux as well. Most (but not all) functions work with Matlab 6.1 and 5. You can place the lightspeed directory anywhere. To make sure lightspeed is always in your path, create a startup.m file in your matlab directory, if you don't already have one, and add a line like this:
Replace 'c:\matlab\lightspeed' with the location of the lightspeed directory. There are some Matlab Extension (MEX) files that need to be compiled. This can be done in matlab via:
I recommend using Microsoft Visual C++ as the mex compiler, though this is not required. You can set the mex compiler by typing 'mex -setup' in matlab. You can find timing tests in the tests/ subdirectory. TroubleshootingIf you are having problems compiling the mex files, check your matlab installation by compiling one of the examples that comes with matlab, such as: mex([matlabroot '/extern/examples/mex/explore.c']) If this does not work, then contact MathWorks for help. You can find some common fixes below. To use Microsoft Visual C++ 2013 with Matlab 8.1 (R2013a), you will need to download this patch: http://www.mathworks.com/matlabcentral/fileexchange/45878-setting-microsoft-visual-c++-2013-as-default-mex-compiler To use Microsoft Visual C++ 2010 with Matlab 7.10 (R2010a), you will need to download this patch: http://www.mathworks.com/support/solutions/en/data/1-D5W493/?solution=1-D5W493 To use Microsoft Visual C++ 2008 on Windows 64-bit, you will need to follow the instructions at: http://www.mathworks.com/matlabcentral/answers/98351-how-can-i-set-up-microsoft-visual-studio-2008-express-edition-for-use-with-matlab-7-7-r2008b-on-64 To use Microsoft Visual C++ with Matlab 7.0 (R14), you will need to download R14 service pack 2, as described here: http://www.mathworks.com/support/solutions/en/data/1-UMEKK/?solution=1-UMEKK To compile mex files on a Snow Leopard upgrade, prior to Matlab R2014a:
Changelist2.8Changed to MIT license. intersect_sorted provides multiple outputs, for compatibility with intersect. Added support for different number types to randbinom and int_hist. Added graphics/draw_loess. Fixes to install_lightspeed, flops_solve, hhist, cut_quantile. 2.7Added the hist2 function. Updated the installer to handle Matlab versions up to R2014b. In version R2014a and later, installation on Mac is now much easier. In version R2013b and later, lightspeed does not replace Matlab's built-in repmat, because the built-in is now faster. Congratulations to MathWorks---it only took them 11 years to catch up with lightspeed's repmat. Perhaps now they can try making sum(x,2) run as fast as lightspeed's row_sum. 2.6Updated the installer to handle MacOSX 10.6 and older versions of matlab (all the way back to 7.0.1). 2.5Updated the installer to handle Microsoft Visual Studio 2010 Express with Windows SDK 7.1. All mex files now use -largeArrayDims. Fixed a bug in multivariate 2.4Lightspeed's normpdf is now called mvnormpdf, for compatibility with the statistics toolbox. Added invnormcdf. Updated the installer. 2.3Support for Matlab R2009a and 64-bit architectures.
2.2The installer now supports Matlab 7.5.
2.1
2.0Many new functions have been added, including sorted-set functions and
mutation. Graphics functions have been moved to a
subdirectory. The formulas for flop counting have been changed, to better
reflect the Pentium 4 architecture. In particular, note the addition of
1.3The main change from version 1.2 is that tri_inv_times has been renamed to solve_triu and solve_tril, and made more efficient. The tricky part is that these have to be linked against Matlab's internal BLAS library. The mex files have also been changed to use the Matlab 5 API. Tom Minka |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论