T
T
Type Programmer2019-12-13 19:17:57
C++ / C#
Type Programmer, 2019-12-13 19:17:57

How to determine the priority of a thread?

I wrote a small home-made 3d render, and it works very slowly, all its work takes place in a separate thread, how to speed up the work of this thread so that it uses all the processor resources?
Created a stream like this

CreateThread(0,0,&ThreadProc,0,0,thread);
            SetThreadPriority(thread,HIGH_PRIORITY_CLASS);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2019-12-13
@MegaCraZy6

how to speed up the work of this thread so that it uses all the resources of the processor?

Increasing the priority will not speed up the work of the thread that is doing the calculations, but it will reduce the responsiveness of all other threads.
To speed up, you first need to understand what exactly slows down, and in order to understand this, you need to profile.
And when it becomes clear - then think about what to do - change the algorithm, parallelize, use SIMD or something else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question