-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node child _resize not found #122
Comments
Hello: |
Hey! I am unable to find the file you are referring to, so I am struggling to recreate the problem. |
Thank you so much for such quick support. Yes, let me get your update and test if it fixed the problem. If not, I will create a codelet that can reproduce the problem. I truly believe m2cpp is such a wonderful tool and appreciate you share it with the community. It works even better than Mathworks' Matlab Coder in a sense that it allows linking to different underlying BLAS library optimized for various platforms. I wish to contribute to this project. Even though I am not a Python programmer, welcome to let me know if anything I can do on my side. Taiwu |
Back Archive Move Delete Spam Re: [jonathf/matlab2cpp] node child _resize not found (#122) Tai-Wu Chiang [email protected] Sep 21 at 5:05 PM Jonathan: So it worked good for that particular problem. Then I found there is another issue with Matlab syntax. If you write a matlab script like the following:
The m2cpp will give an exception at Because node[0].str doesn't have '(' there.
It works fine this way. So I guess it's just a small glitch. We just have to write Matlab in a simpler way, not to confuse the translator. Thanks. Taiwu |
Hey. Yes, the update is to my local master. It is a long story, but the emc2-fork was created for an EU-project that I was part of in the beginning. I believe the project is over, so moving back to my own branch is on my agenda. But you are right, there are some updates there that I should include here. I will try to get to it soon, together with your bug. As for help, that is much appreciated. |
Great! This is such a valuable project and will benefit lots people in the long run. Yes, please let me know things like testing or the like that I can do, perhaps with some contributions. |
Hi Jonathan: I have now got quite familiar with using the tool. There are some mistakes in translation are frequently repeating itself and I can easily spot and fix them in the C++ code. Do you like me to make a list of such things? I understand you are doing this as a volunteer and may not have time to do all the fixes by yourself. So I don't want to overwhelm you with a whole list of bugs unless you like to. However, I do see the values of such tool and wish to make it works better. If you can guide me, then I may be able to fix some of the easy bugs. Thanks, Taiwu |
Okay, I have gotten back into the mode of working a little on this project. Since this is one of my older project, I see some need for TLC. I have started the work on that now. As I almost do not work with C++ these days, translation suggestions would be very useful. If you don't mind:
This will drastically reduce the amount of work for me on each problem. |
so happy to hear this. I will be glad to do so. |
As soon as you noted the discrepancy I merged the |
Ok, here is the first bug report: (Matlab script is embedded in the C++ code as comments) C++ code translated:#include int main(int argc, char** argv)
|
same thing can be done for 'cube' as the following: { |
Thanks. |
I got an error when convert HANTS.m in the following MATLAB file.
https://cn.mathworks.com/matlabcentral/fileexchange/38841-matlab-implementation-of-harmonic-analysis-of-time-series--hants-
`kong@KONG:/mnt/c/Users/kongdd/m2cpp-master$ m2cpp HANTS.m
Traceback (most recent call last):
File "/usr/local/bin/m2cpp", line 99, in
File "/usr/local/lib/python2.7/dist-packages/matlab2cpp/init.py", line 230, in main
builder.project.translate(args)
File "/usr/local/lib/python2.7/dist-packages/matlab2cpp/node/frontend.py", line 171, in translate
backend.translate(self, opt)
File "/usr/local/lib/python2.7/dist-packages/matlab2cpp/node/backend.py", line 479, in translate
map(translate, node)
File "/usr/local/lib/python2.7/dist-packages/matlab2cpp/node/backend.py", line 493, in translate
translate_one(node, opt)
File "/usr/local/lib/python2.7/dist-packages/matlab2cpp/node/backend.py", line 557, in translate_one
value = value(node)
File "/usr/local/lib/python2.7/dist-packages/matlab2cpp/rules/cube.py", line 135, in Set
node = node.resize() # matlab to armadillo fix for cubes
File "/usr/local/lib/python2.7/dist-packages/matlab2cpp/node/frontend.py", line 289, in resize
backend.resize(self)
File "/usr/local/lib/python2.7/dist-packages/matlab2cpp/node/backend.py", line 234, in resize
if node["_resize"]:
File "/usr/local/lib/python2.7/dist-packages/matlab2cpp/node/frontend.py", line 404, in getitem
raise IndexError("node child "%s" not found" % i)
IndexError: node child "_resize" not found`
The text was updated successfully, but these errors were encountered: