![]() mirai surpasses all other Scilab-based implementations. Of course the cross-over point must be determined separately in each case.Ī compiled function, integrated with addinter, is very fast. Usually this will be the case for large problem sizes. fort is only justified in situations where a significant amount of time is spent in the low-level user-routine. The overhead of the fort-call in mirf is high it is hard to amortize for that. This is especially true for large vectors or matrices. index-free Scilab code, like mirror4, performs well. Scilab code that makes heavy use of indexing, like mirror1, is extremely slow no matter what problem size. If we compare the performance of our three Scilab mirror routines mirror1, mirror2, and mirror3 together with the two incarnations of the hard-coded routine mirf, and mirai, we reach at the following conclusions: The straight line between (20 elements, 550 MFLOPS) and (20000 elements, 550 MFLOPS) marks the peak performance of the processor. Performance comparison of mirror, mirf, mirai, and a pure C-program doing the same job on a PIII/550 GNU/Linux box. Finally it will supply us with a Scilab function called mirai(a, dir). Anyhow, Example 6-4 shows the description ( ". intersci is described very well in the SCI /doc/Intro.ps. The glue code is compiled (with a Fortran compiler) and linked to Scilab. Intersci can create the Fortran glue code for a C or Fortran function to make it callable form the Scilab interpreter. The fast alternative to using fort, which dynamically creates an interface to a C or Fortran function is using intersci, which which creates an interface suitable for static loading. The only thing missing is the glue code between Scilab and mir. The dcopy( n, x, incx, y, incy, ) is from BLAS level 1, and copies n double precision elements from vector x in increments of incx to y, where it uses increments of incy. * Mirror n*m-matrix a along direction prescribed We revive our matrix mirroring example from Section 6.1.2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |