comp.soft-sys.matlab
[Top] [All Lists]

Re: How can I compile a matlab function .m file into mex dll?

Subject: Re: How can I compile a matlab function .m file into mex dll?
From: "kiki"
Date: Thu, 22 Sep 2005 10:48:24 -0700
Newsgroups: comp.soft-sys.matlab
OK! Is there any way to make it possible? I have to make it work.

"Steve Amphlett" <Firstname.Lastname@xxxxxxxxxxxxxxxx> wrote in message 
news:ef15d81.5@xxxxxxxxxxxxxxxxxxx
> kiki wrote:
>>
>>
>>>You can't compile it into a mex DLL unless you get an older
>> version.
>>>Why do you want a mex DLL? You can however create a DLL just
> not
>>>callable from matlab.
>>
>>
>> What do you mean "I need an older version"? I am using Matlab
>> 7.0.04...
>>
>> I just need this dll to be called from within Matlab... so it must
>> be
>> a mex dll...
>
> From my failing memory (so probably not too reliable)...
>
> People used to be able to compile their poorly-written, loopy m-files
> into MEX files. The MEX files produced were faster than the original
> m-files and prevented users from needing to know how to convert their
> code to C. Users could make their loopy code run as fast as
> vectorized code (and of course, loopy C-MEX code). The other benefit
> was that code could be hidden (probably a good thing if full of
> loops!).
>
> Then TMW introduced the JIT, which allowed loopy ML code to run as
> fast as the auto-generated C code that came out of the old ML
> compiler (and in some cases, faster than vectorized code). The old
> compiler became obsolete.
>
> The new ML compiler's main job is to allow ML programs to be
> distributed standalone, without using licenses. But there is much
> baggage involved (you don't get an .exe or even an .exe and a few
> DLLs).
>
> Lastly, hiding code is now best done by distributing your functions
> as p-code. ML will have already converted your sloppy, loopy code
> into fast code for you. 



<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy