News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Intel Multiprocessor programming with Masm

Started by K_F, July 05, 2020, 02:36:58 AM

Previous topic - Next topic

K_F

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:
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

hutch--

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.

Adamanteus

 That's in Windows SetAffinityMask and CreateThread - unified for any hardware.

daydreamer

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
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

K_F

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.
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

K_F

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.
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

hutch--

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.

K_F

'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'