If you look here: http://pastebin.com/mfbb867f I took snippets of my code out that would be relevant to my question. The vector multans is in shared memory, I have all of that defined elsewhere and I didn't want to take up more space than necessary.
I commented where I have questions and since this is the very first time I've EVER used the fork function I have no idea if the way I'm doing it is acceptable.
Basically I have two matrices holding values and I need to multiply both the matrices together to get a bunch of numbers. Then, I sum those numbers together (in the right order) to get the resulting output matrix.
In this program 'tsets' is the amount of multiplies I need to do depending on the sizes of the matrices (it's defined elsewhere and changes automatically depending on matrix size).
The multiplier and multiplicand variables are meant to be set (somehow, this is one of my questions) before the fork so that each process gets it's own set of numbers to multiply together.
The index variable is supposed to be used to keep track and store the resulting multiplied answers back in the multans vector.
If something else isn't clear let me know. It's tough for me to talk about this stuff since I'm not too comfortable with it yet. Thanks for all the help
I commented where I have questions and since this is the very first time I've EVER used the fork function I have no idea if the way I'm doing it is acceptable.
Basically I have two matrices holding values and I need to multiply both the matrices together to get a bunch of numbers. Then, I sum those numbers together (in the right order) to get the resulting output matrix.
In this program 'tsets' is the amount of multiplies I need to do depending on the sizes of the matrices (it's defined elsewhere and changes automatically depending on matrix size).
The multiplier and multiplicand variables are meant to be set (somehow, this is one of my questions) before the fork so that each process gets it's own set of numbers to multiply together.
The index variable is supposed to be used to keep track and store the resulting multiplied answers back in the multans vector.
If something else isn't clear let me know. It's tough for me to talk about this stuff since I'm not too comfortable with it yet. Thanks for all the help