Is it possible to define and create an array of structures? This is relevant in the context of multithreading. For example, suppose I use CMLMT to maximize some sort of profile likelihood function. For each auxiliary index, I would like to save the cmlmtResults structure. After the threadFor loop, then I would like to compare all the cmlmtResults structures.
1 Answer
0
Ok, I think I have figured it out:
struct cmlmtResults cmlout;
cmlout = reshape(cmlmtResultsCreate,n,1);
threadFor i(1,n,1);
struct cmlmtResults out;
....
cmlout[i,1]=out;
....
threadEndFor;
Your Answer
1 Answer
Ok, I think I have figured it out:
struct cmlmtResults cmlout;
cmlout = reshape(cmlmtResultsCreate,n,1);
threadFor i(1,n,1);
struct cmlmtResults out;
....
cmlout[i,1]=out;
....
threadEndFor;