Has anyone looked into Multiprocessor programming in Masm, you know the cpu has a few processors on board.
Is it possible to do this in Windoze, and the IDE to do it in.
Looking at an alternative to GPU shader programming to achieve similar (albeit slower - maybe) results.
:thumbsup:
Van,
Not sure what you are after, anything later than a PIV has multiple cores. There are boards around for multiple Xeon processors but I doubt that is what you are after. As far as GPU processing, I gather you need to use libraries to access the GPU and that varies with the graphics hardware you are using.
That's in Windows SetAffinityMask and CreateThread - unified for any hardware.
Quote from: K_F on July 05, 2020, 02:36:58 AM
Has anyone looked into Multiprocessor programming in Masm, you know the cpu has a few processors on board.
Is it possible to do this in Windoze, and the IDE to do it in.
Looking at an alternative to GPU shader programming to achieve similar (albeit slower - maybe) results.
:thumbsup:
there is some example in masm 32 sdk,which creates several windows with each thread has its own wndproc
I only tried simple things so far,many years ago ddraw program with a workerthread that just testdrawed lowlevel in a memory buffer later used in mainloop with the usual lock/unlock screenmemory with/without vertical retrace and loop to write pixels to screen(peekmessage style)
SSE has only the very basic sqrtps compared to pixelshader hardware to do circles/spheres fast
maybe SDL2 is alternative to ddraw
Quote from: hutch-- on July 05, 2020, 02:43:21 AM
Van,
Not sure what you are after, anything later than a PIV has multiple cores.
Sorry, I mean running code on many cores ('CPUs/Multiprocessors') on one CPU chip.
I'm not up to date on this, but as far as I know Multithreading is only on one CPU core.
I'll be looking for running code on all the cores of a cpu.
Quote from: Adamanteus on July 05, 2020, 04:11:29 AM
That's in Windows SetAffinityMask and CreateThread - unified for any hardware.
Thanks.. Looking at this.
Van,
With a multi-core processor, running multiple threads means running code on multiple cores. What you keep an eye on is the core/hyperthread count so if your system has 8 logical processors (4 cores and 4 threads) you can run 8 threads without any problems. The OS does the core switching automatically so you don't have to try and keep track of it.
Thanks, I'll start on this :thumbsup: