Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Performance - Add and subtract, saving memory operations

I have 3 matrices: A,B,C. I want to add A to C (save in C), and then subtract B from C (save in C) Now I do it with two commands: add (or accumulate), and then subtract

I think that I can save memory load (assembly) operations if I do it in some custom way. If I do it in one loop, I can load the C register only once, instead of twice as I do it today. Is there an OPENCV operation for add+subtract, or should I write it myself? If you have tips for doing it, it will be highly appreciable.