I need to test the embedded computer for the most extreme conditions of heat and current generated, and for this I want to write a program that actually uses the CPU resource as a quad-core processor (one thread per core). Can you suggest something that would be a very greedy processor?
I have to do this for Linux on ARMv7, and the language is C or C ++, the other examples I found are either for Windows or not for C / C ++.
I am trying to do something like this on my Windows computer and it seems to work, since it occupies 12% of the total processor power (this is i7 quad core 2 threads per core):
float x = 1.5f; while (1) { x *= sin(x) / atan(x) * tanh(x) * sqrt(x); }
I do not know how to do this multithreaded.
source share