Optimized Elementary MATLAB Functions Matlab script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name: DoubleClass.zip
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Matlab
  • Price:Freeware
  • Company: Marcel Leutenegger (View more)

Optimized Elementary MATLAB Functions script description:




Publisher review:
Optimized Elementary MATLAB Functions - A library of high performance elementary MATLAB functions. During the optimization of the C-MEX wrapper, I noted that all mxArray creation functions initialise the data elements to zero. On creation of large arrays, the initialisation tends to void the processor caches and block the memory bus.

For a sequence of function calls where the result of the previous function serves as input for the next one, I found that the initialisation takes up to 60% of overall execution time. Typically, I allocated a new mxArray with:arr=mxCreateNumericArray(ndims,dims,mxDOUBLE_CLASS,mxREAL);To avoid initialisation, I use now something similar to:arr=mxCreateDoubleMatrix(0,0,mxREAL); // does not allocate datamxSetDimensions(arr,dims,ndims); // does not touch datan=mxGetNumberOfElements(arr); // only if n isn't knownmxSetPr(arr,mxMalloc(n*sizeof(double))); // NO initialisationmxMalloc is the only memory allocation function that doesn't initialise the allocated data elements. You should try out the second variant if you work on large arrays. For scalars, you may note a slight increase of the execution time. Requirements: ยท MATLAB Release: R12
Optimized Elementary MATLAB Functions is a Matlab script for Development Tools scripts design by Marcel Leutenegger. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5