Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert changes on memcpy matrix getters
Fix issue Qucs#133 The C memcpy was replaced by loops, but it causes the kernel to segfault during SP analysis with Noise. memcpy is good with POD and tends to be inlined [1]. Replacement candidate is std:copy. Please provide testcase and testbench. [1] http://nadeausoftware.com/articles/2012/05/c_c_tip_how_copy_memory_quickly
- Loading branch information
eb461ea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uh, it took me a long time staring at the screen to realize that the problem was the check in the inner for loop, that should be
j < size
instead ofi < size
...FYI, I have tried both version, with
memcpy
and thefor
loops and I do not see any difference in the simulation time for a moderately complex circuit.I also compiled with
clang++
andg++
to see if there was a significant difference between the two:when using
clang++
the simulation time wasreal 0m23.195s
using-O0
real 0m7.668s
using-O2
when using
g++
, the time wasreal 0m9.963s
using-O2
real 0m6.372s
using-Ofast, etc.
so
clang++
is working quite well...