> > 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).
All right. So all container classes and interfaces should be in x10.util, right? Also I'll be probably implementing a deque, it doesn't matter that class with such name exists in x10.lang, does it? And should I add new files to some build file(s)? > > 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]. Okay, thanks for explanation. Would you also mind explaining what those functions in Unsafe do (for someone who comes from c/c++ background...)? I looked at code of GrowableRail for reference and I don't quite understand why it's done the way it is... For example why sometimes allocRailUninitialized is used and other times allocRailZeroed , and why is clearRail called? ------------------------------------------------------------------------------ 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