John MacFrenz <macfr...@yandex.com> wrote on 10/09/2014 10:13:11 AM:
> Anyway, I will probably be implementing some containers is missing.
> I'm not really that good programmer, but would you still be
> interesting in getting patches?

Sure.  The preferred way would be to create an issue in our JIRA and attach
the patch to it:  http://jira.codehaus.org/browse/XTENLANG.  You'll need to
fill out a Contributors License Agreement as well and put it in JIRA with
the patch (http://x10-lang.org/x10-development/contributor-agreement.html).


Marco Bungart <m.bung...@gmx.net> wrote on 10/09/2014 11:47:57 AM:
> Hi John,
>
> Am 09.10.2014 um 16:13 schrieb John MacFrenz:
> > [...]
> > Also, I'd like to know if I have understood this correctly: If I have
> > Rail which stores instances of class, Rail stores just references and
> > instances aren't in continuous block of memory. If that's the case, is
> > there way to change this behaviour since doesn't this cause overhead
> > when accessing data?
>
> That is correct. X10 behaves just like Java in this respect:
> Arrays/Rails store references to Objects. An one-dimensional Array/Rail
> is allocated as continuous block of memory in which the references are
> stored. A multidimensional Array/Rail is an Array/Rail of Arrays/Rails
> and therefore this memory may not be one continuous block.
>

Thanks Marco!   A little additional information...

X10 has structs in addition to classes to provide the ability to avoid this
indirection (in Native X10) for immutable data.  Structs are primarily
intended for building "user-defined primitive types", for example K doubles
representing a point in K-dimensional space.  There's a struct example in
x10.dist/samples/StructSpheres.x10.

A minor enhancement to the other point.  A Rail[Rail[double]] is indeed a
C-style Rail of Rails, so the memory is very unlikely to be contiguous.
The x10.array and x10.regionarray Array classes support multi-dimensional
arrays (row-major by default) using a single Rail as the backing storage
for all of their data.  So depending on what you want you can either get
the array-of-arrays memory layout by using Rail[Rail[T]] or a single piece
of backing storage into which all the data is placed and indexed by using
Array[T].

--dave
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to