The MASM Forum

General => The Workshop => Topic started by: K_F on July 05, 2020, 02:36:58 AM

Title: Intel Multiprocessor programming with Masm
Post by: 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:
Title: Re: Intel Multiprocessor programming with Masm
Post by: hutch-- on July 05, 2020, 02:43:21 AM
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.
Title: Re: Intel Multiprocessor programming with Masm
Post by: Adamanteus on July 05, 2020, 04:11:29 AM
 That's in Windows SetAffinityMask and CreateThread - unified for any hardware.
Title: Re: Intel Multiprocessor programming with Masm
Post by: daydreamer on July 05, 2020, 06:02:40 AM
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
Title: Re: Intel Multiprocessor programming with Masm
Post by: K_F on July 05, 2020, 10:32:12 PM
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.
Title: Re: Intel Multiprocessor programming with Masm
Post by: K_F on July 05, 2020, 10:34:07 PM
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.
Title: Re: Intel Multiprocessor programming with Masm
Post by: hutch-- on July 05, 2020, 11:05:02 PM
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.
Title: Re: Intel Multiprocessor programming with Masm
Post by: K_F on July 06, 2020, 12:12:07 AM
Thanks, I'll start on this  :thumbsup: