I'm wondering what are the differences between programming a SHARC program with VisualDSP++ either in C or in C++.
Are there any rules of thumb to predict the results regarding speed and program size?
I request you to kindly refer to page 436/580 of the Visual DSP++ 5.0 Compiler Manual, which provides all the guidelines regarding how to get the maximum code performance from the compiler.
C++ code using only C features has very similar performance to pure C code. Many higher level C++ features (for example, those resolved at compilation, such as namespaces, overloaded functions and also inheritance) have no performance cost. However, use of some other features may degrade performance. Hence we must carefully weigh the performance loss against the richness of expression available in C++.
The link for the manual is given below:
Please let me know in case you have any further queries/doubts.
I'm writing timing critical functions in Assembly anyway. C and C++ is only used around it for managment and control stuff. So good to hear that the performance is similar.
Can you explain a little bit more, which features may degrade performance? I'm wondering if they are used in DSP programs...
The topic of C vs. C++ is a fairly complex topic, and is not specific to DSP, or the VisualDSP++ development tools (have a search for "C vs. C++" in your chosen search engine, and you will find many papers and discussions on the topic).
I would advise that ours is an abridged C++ Library, as documented in Chapter 3 of the C and C++ Run-Time Library manual.
C of VDSP++ is better support fixed point than C++ of VDSP++.
But it was fixing in CCES.
I'm used C++ and develop the program for motor control.
Retrieving data ...