I need to find the number of operations that a specific algorithm is doing: assigns, increments, comparators of integers, comparators of floats, multiplications of integers, etc.
I'm doing this manually and even though feasible it's a lot of work. So, do you know of any tool that does this automatically or semi-automatically?
I'm asking this because there are specific cases when I can't (or it's very difficult to) manually discover the number of operations. For example, the algorithm has one qsort
and looking at the confusing code of that function looks like a LOT of work.
Edit: In response to some comments on why do I want this. The objective in the future in to implement this algorithms that are currently on software in hardware language. So, as atan
latency differs from multiplications or sum latency, it is very important to measure which algorithm has the correct number of operations to be converted into hardware-language.