kyamagu / mexplus

C++ Matlab MEX development kit.
Other
99 stars 49 forks source link

Support for complex numbers #12

Closed a-ma72 closed 9 years ago

a-ma72 commented 9 years ago

Hi, perhaps you're interested in using complex number arrays with MEXPLUS... (My additions on dispatch.h and arguments.h are very close to my benefits, that you might ignore.)

Kindly regards, Andreas Martin

kyamagu commented 9 years ago

@AndreasMartin72 Sure, supporting complex numbers sounds good. But the current PR does not compile by itself, and I need to check a couple of things to bring it into the main branch. Visual Studio has a lot of bugs related to type traits..., and that's why the current code looks messy in some part. Also please check the compiler compatibility at your side if possible. Thanks!

a-ma72 commented 9 years ago

Yes, you're right ;-) I also use gcc 4.4.7 on Linux at business, where I can compile the code without problems. Where did you have trouble? (you can send me your compiler output)

Regards, Andreas

---- Kota Yamaguchi schrieb ----

@AndreasMartin72 Sure, supporting complex numbers sounds good. But the current PR does not compile by itself, and I need to check a couple of things to bring it into the main branch. Visual Studio has a lot of bugs related to type traits..., and that's why the current code looks messy in some part. Also please check the compiler compatibility at your side if possible. Thanks!

— Reply to this email directly or view it on GitHub.

kyamagu commented 9 years ago

@AndreasMartin72 The first error I got using OS X 10.10 + clang 6.1.0 is that the second new argument to MEX_DEFINE is missing in the test. Did you really compile the test code without any remaining commit? I haven't tested on a Windows environment yet.

/Users/kyamagu/work/mexplus/example/private/Database.cc:44:15: error: too few
      arguments provided to function-like macro invocation
MEX_DEFINE(new) (int nlhs, mxArray* plhs[],

My basic policy regarding this project is to support at least three platforms: Windows 7 + Visual Studio (perhaps 2010 or later), OS X latest, and Linux. If the code is compiling fine in gcc 4.4.7, probably Linux is already good. But I need to check the other two.

a-ma72 commented 9 years ago
                                                                                  Oh, you are right. ‎These changes are made after testing MxArray. I will make a branch and send you a new PR...                                                                                                                                                                                                                                                                                                                                        Regards, Andreas                                                                                                                                                                                                                 Von: Kota YamaguchiGesendet: Dienstag, 16. Juni 2015 09:36An: kyamagu/mexplusAntwort an: kyamagu/mexplusCc: Andreas MartinBetreff: Re: [mexplus] Support for complex numbers (#12)@AndreasMartin72 The first error I got using OS X 10.10 + clang 6.1.0 is that the second new argument to MEX_DEFINE is missing in the test. Did you really compile the test code without any remaining commit? I haven't tested on a Windows environment yet.

/Users/kyamagu/work/mexplus/example/private/Database.cc:44:15: error: too few arguments provided to function-like macro invocation MEX_DEFINE(new) (int nlhs, mxArray* plhs[],

My basic policy regarding this project is to support at least three platforms: Windows 7 + Visual Studio (perhaps 2010 or later), OS X latest, and Linux. If the code is compiling fine in gcc 4.4.7, probably Linux is already good. But I need to check the other two.

—Reply to this email directly or view it on GitHub.

a-ma72 commented 9 years ago

Now I left only changes to complex number support in master.

Regards, Andreas

a-ma72 commented 9 years ago

Code checked on linux (gcc 4.4.7) and Windows 7 (MSVC 2012)

kyamagu commented 9 years ago

@AndreasMartin72 Seems to be compatible with all platforms. I had a bit of code cleanup and the commit is available in the master branch now. Big thanks!