Ditutup

Creating A Table From Two Structs

I've got a two structs with information destined for 4 processors. Upon receipt of the two structs (which is part of an 'overall' struct) each processor will create a vector of 'storable' objects (see source).

So lets assume I'm processor 0. The struct LSP_Input_Def_T is a two dimensional struct such that:

LSP_Input_Def_T LSP_Input_Def [ max_seg ] [ max_processors ];

Could be viewed as:

LSP_Input_Def_T LSP_Input_Def [ 5 ] [ 4 ];

The header overall is transmitted to all 4 processors. Again, I'm processor 0 so I only care about:

LSP_Input_Def_T LSP_Input_Def [ 0 ] [ 0 ];

LSP_Input_Def_T LSP_Input_Def [ 1 ] [ 0 ];

LSP_Input_Def_T LSP_Input_Def [ 2 ] [ 0 ];

LSP_Input_Def_T LSP_Input_Def [ 3 ] [ 0 ];

LSP_Input_Def_T LSP_Input_Def [ 4 ] [ 0 ];

Note the second dimension (all zeros) of the two dimensional array refers to the processor.

Now the header - in main - is 'tailored towards processor 0'. i.e LSP_Input_Def is only filled out for processor 0. In essence, if I could simulate 0. I could simulate the reaminder.

At issue: Notice the two cases ran. Two separate objects. ov and ov2.

The 'order field' in ov2 is incorrect. I was trying to determine a _nicer_ way if you will to do the search. The linear search shown in the code doesn't make sense. The file [url removed, login to view] contains my attempt. Need assistance in fixing the 'order' field.

My results from the source is as follows:

/*

(sid)0 (order)1 0 100

(sid)3 (order)2 1 200

result 2

(sid)3 (order)1 1 100

(sid)0 (order)2 0 200

Press any key to continue

*/

The information pertaining to (result 2)

(sid)3 (order)1 1 100

(sid)0 (order)2 0 200

is incorrect. Should read:

(sid)3 (order)2 1 100

(sid)0 (order)1 0 200

See file for details - file is best viewed with notepad. NOTE: strict C++ desired. i.e container usage is appropriate.

Kemahiran: Pengaturcaraan C

Lihat lebih lanjut: vector usage, vector order, vector in cpp, vector cpp, vector container, vector 3 container, vector 2 container, struct in cpp, struct cpp, read vector, make a vector file, is incorrect, file processor, c vector array, cpp vector, cpp struct, cpp array, code processor, care source, care now, array in cpp, any file notepad, a. m. best, tailored for you, two

Tentang Majikan:
( 123 ulasan ) Orlando, United States

ID Projek: #41392

6 pekerja bebas membida secara purata $81 untuk pekerjaan ini

ocherk

Hi, I can try to do this. But need comments from you. Regards.

$100 USD dalam sehari
(1 Ulasan)
3.0
johnchristopher

Hi, Im John Christopher, working as a software Engineer in a multi national company in C,C++ environment. And I have previously worked as a lecturer in an engineering college. I have developed a software called SA Lagi

$80 USD dalam 15 hari
(1 Ulasan)
1.7
pug

I have very much wide experience of programming with included simulation programs. I can guarantee high quality of work. I can send the additional information by inquiry. Terms and working costs should be specified aft Lagi

$100 USD dalam 2 hari
(0 Ulasan)
2.0
indiandragonx

Hello mate, We understood your requirement, we have experieced team for handling applications in various domains, since we have the specialized team for c and c++ the job can be done delivered before the deadline , we Lagi

$85 USD dalam 2 hari
(0 Ulasan)
0.0
swethagouru

Hi, Iam Swetha,a computer science engineering student from [url removed, login to view] my experience,i don't have any industry experience.I enjoy writing viruses and complex programs involving using underlying resourses well.I wi Lagi

$70 USD dalam 2 hari
(0 Ulasan)
0.0
xsysfan

Hi, I have come up with solution to the problem with ordering. And need extra information for implementing priority mechanism if needed. My Regards.

$50 USD dalam sehari
(0 Ulasan)
0.0