Re: [julia-users] shared array of user defined type

2016-10-14 Thread Mauro
On Fri, 2016-10-14 at 09:41, Alexandros Fakos  wrote:
> Thank you Mauro. If I understand correctly, this means that in SharedArrays
> I cannot use immutable types whose fields contain arrays. Is that right?
> Thanks a lot,
> Alex

Yes. You can check with `isbits`.

> On Friday, October 14, 2016 at 1:57:42 AM UTC-5, Mauro wrote:
>>
>> On Fri, 2016-10-14 at 00:02, Alexandros Fakos > > wrote:
>> > Hi,
>> >
>> > Is there a way to create a shared array of a user defined composite
>> > type?
>>
>> Yes, but only for isbits types, i.e. immutables which do not contain
>> non-immutable fields.  Otherwise you could look into the new &
>> experimental threads support in 0.5.
>>
>> > I want to parallelize using pmap() on a function f() which has as
>> > arguments user defined composite types.
>>


Re: [julia-users] shared array of user defined type

2016-10-14 Thread Alexandros Fakos
Thank you Mauro. If I understand correctly, this means that in SharedArrays 
I cannot use immutable types whose fields contain arrays. Is that right?
Thanks a lot,
Alex

On Friday, October 14, 2016 at 1:57:42 AM UTC-5, Mauro wrote:
>
> On Fri, 2016-10-14 at 00:02, Alexandros Fakos  > wrote: 
> > Hi, 
> > 
> > Is there a way to create a shared array of a user defined composite 
> > type? 
>
> Yes, but only for isbits types, i.e. immutables which do not contain 
> non-immutable fields.  Otherwise you could look into the new & 
> experimental threads support in 0.5. 
>
> > I want to parallelize using pmap() on a function f() which has as 
> > arguments user defined composite types. 
>


Re: [julia-users] shared array of user defined type

2016-10-14 Thread Mauro
On Fri, 2016-10-14 at 00:02, Alexandros Fakos  wrote:
> Hi,
>
> Is there a way to create a shared array of a user defined composite
> type?

Yes, but only for isbits types, i.e. immutables which do not contain
non-immutable fields.  Otherwise you could look into the new &
experimental threads support in 0.5.

> I want to parallelize using pmap() on a function f() which has as
> arguments user defined composite types.