The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Slow PFM fitting using c functions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

JPCASEY

USA
Posts

Posted - 01/11/2005 :  1:11:48 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5PRO
Operating System: WinXP

I'm using compiled c functions for fitting using the pfm and fitting is extremely slow. I can fit my spectra in a second or two using the built in gauss function. When i implement the same gauss function in c and try to fit, it takes about 2 minutes per iteration. It can't possibly be taking 2 minutes for the calculations can it? Is there a chance that there is a problem with origin passing data slowly to the external function?
Thanks!
John

rlewis

Canada
253 Posts

Posted - 01/11/2005 :  1:19:45 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I have also found fitting OriginC functions in the PFM to be quite slow. As far as I'm aware, the only solution is to code the function(s) in an external DLL.
Go to Top of Page

JPCASEY

USA
Posts

Posted - 01/12/2005 :  1:18:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'm attempting to implement my functions in a DLL. I don't have any experience with DLL's unfortunately, so I'm attempting to use the example that comes with the PFM. It includes the DLL_Func.c source and DLL_Func.dll files. In theory I should be able to just compile the DLL_Func.c to get DLL_Func.dll but unfortunately I can't get Origin to compile it. The compiler can't find the windows.h header file, which I would imagine is a standard header that should be included. I tried compiling using the windows.h header from the Dev-C++ (Free C/C++) compiler, but the compiler just gives me a bunch of errors, so i'm guessing that header won't work. Any ideas where the correct windows.h might be? I believe I can modify the code in the example DLL for my function, but it's no good if it can't compile.
Thanks!
John
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000