News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

multithreaded ???

Started by daydreamer, January 30, 2022, 10:28:49 AM

Previous topic - Next topic

daydreamer

Hi
I am trying to make a multithreaded program,that is suppose to make use of producer(workerthread)/consumer(mainthread) algo
also something is wrong when console exits it hangs
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

HSE

Equations in Assembly: SmplMath

jj2007


daydreamer

#3
new version
dont know how fast a workerthread will go on other cpus and how much change threadpriority will do on performance?
its meant to use many registers,taken advantage of workerthread without api calls can use all registers,whats why I want to unroll it

seem to get calculation right,also solved printing crap with use extra variables for output
tricky not be able to use other instructions that affect flags while adding BCD's
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

daydreamer

On Win10 ustr$ seem to work,but on win8 computer it calls signed integer conversion? While I try a fast get only first 20 digits of f(2^32)?
Call long 64 bit conversion instead?


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

HSE

Quote from: daydreamer on February 07, 2022, 07:44:51 PM
On Win10 ustr$ seem to work,but on win8 computer it calls signed integer conversion?

Is an old MASM32 version? (See Topic: ustr$ Problem ? )
Equations in Assembly: SmplMath

daydreamer

Quote from: HSE on February 07, 2022, 11:35:27 PM
Quote from: daydreamer on February 07, 2022, 07:44:51 PM
On Win10 ustr$ seem to work,but on win8 computer it calls signed integer conversion?

Is an old MASM32 version? (See Topic: ustr$ Problem ? )
thanks :thumbsup:
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

hutch--

Magnus,

You are doing to have to stop daydreaming about well know technology, if you can master thread technology in either 32 or 64 bit Windows you will have arrived at one of the most powerful techniques for dealing with data, graphics or functionality.

Try a few of these, the executable that starts is the MASTER process or the MAIN process and from that process you can start one or more threads to do any of a multitude of things. You can start a thread as soon as its created OR you can start it suspended and restart it later.

You learn how to use CreateThread() and any of the supporting functions, write the code then test it to make sure it works correctly.

daydreamer

Quote from: hutch-- on February 08, 2022, 04:07:06 PM
Try a few of these, the executable that starts is the MASTER process or the MAIN process and from that process you can start one or more threads to do any of a multitude of things. You can start a thread as soon as its created OR you can start it suspended and restart it later.

You learn how to use CreateThread() and any of the supporting functions, write the code then test it to make sure it works correctly.
I can add thread that uses formula ( ( (1+sqrt(5))/2 )^n - ( (1-sqrt(5))/2 )^n )/sqrt(5)
thread that saves and load
but this was learned from tutorial producerthread sends messages/consumer thread recieves messages combined with fibonnaci when I found out printing took seconds,while calculation takes cycles

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

hutch--

Magnus,

I don't like to be hard on you but you are talking nonsense here. Thread creation is using Windows API functions with other API functions to assist and/or manipulate threads. Posting mathematical notation is simply a nonsense, you create threads first and if you have some number crunching to do, you do it IN THE THREAD.

InfiniteLoop

That expression seems awfully familiar.
Fibonacci sequence?
Yes it is. edit: I didn't even notice its already mentioned.

Caché GB

Hi daydreamer

Iczelion's Tutorials:-

Tutorial 14: Process
Tutorial 15: Multithreading Programming
Tutorial 16: Event Object

will show you how it's done.
Caché GB's 1 and 0-nly language:MASM

daydreamer

Quote from: Caché GB on February 09, 2022, 12:05:10 PM
Iczelion's Tutorials:-

Tutorial 14: Process
Tutorial 15: Multithreading Programming
Tutorial 16: Event Object

will show you how it's done.
Thanks  :thumbsup:
Probably also fix on win8 it exits with popup that it won't work properly
@infiniteloop
Yes it's fibonnaci, that I want to improve with SIMT
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

daydreamer

I gone thru tutorials
can I  SendMessage zero terminated ascii directly from one of the Workerthreads? To a windows gui control?


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