Message: how to merge data of an array of struct from different threads using G4Accumulable Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question how to merge data of an array of struct from different threads using G4Accumulable  

Forum: Multithreading
Date: 08 Jan, 2017
From: Jaafar EL Bakkali <Jaafar EL Bakkali>

Hi All,

I have an instance of an array of struct called sdata as follows:

sdata*** mysdata;

where sdata is declared as:

struct sdata { double x,double y, double z; }

I want to declare mysdata as Accumulable, in other words, I want to replace this line:

G4Accumulable<G4double> data;

by the following:

G4Accumulable<sdata***> sdata;

I want for example to merge values of sdata[i].x ( where i is in [0,10]) given by each thread.

How I can do this correctly.

Thanks

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: how to merge data of an array of struct from different threads using G4Accumulable   (Ivana Hrivnacova - 20 Jan, 2017)
 Add Message Add Message
to: "how to merge data of an array of struct from different threads using G4Accumulable "

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews