Jump to content

Coding challenge - XNode Array operations


Recommended Posts

Hi all,

Do you want to learn the secrets of XNodes? What would be a better way than playing around yourself? I challenge everybody to code multi-dimensional array operations that accept any kind of array of any rank and datatype as input.

I was thinking of following two operations but you can also surprise me with some nice ideas.

  1. Array size Xnode that always returns array size as 1d I32 array. Each element of the output array is a dimensionality of each dimension. If the input is a scalar that is not an array, an empty 1d I32 array is returned.
  2. Multidimensional transpose array. The transpose array takes any array or scalar as first input. Second input is wanted dimension order of dimensions as I32 array. The transpose array returns a transposed array. It either makes it in-place or creates only one buffer copy and places elements to that buffer copy in-place. Too long dimension order inputs are allowed and trucated to the length of the array. The dimension order input may be shorter than the rank of an array in which case the rest of the dimensions will be assumed to be in order from lowest to highest. For example if the dimension order input is {0,2} for a 4 dimensional array the order of dimensions should be {0,2,1,3}. An error-in and error-out are required to return an error when the dimension order input is invalid i.e. contains dimensions that are non-existent for input array.

As an award I'll help the winner(s) to transform the library a commercial quality OpenG libraries under BSD license (if the rest of OpenG community has no objections). If the quality of the XNodes is not high enough, then there will be no winenr.

*Read, I'd do these by myself but I'm too busy so I try to leverage the power of LAVA*

Link to comment

QUOTE(Tomi Maila @ May 23 2007, 01:31 PM)

Array size Xnode that always returns array size as 1d I32 array. Each element of the output array is a dimensionality of each dimension. If the input is a scalar that is not an array, an empty 1d I32 array is returned.

The feature I've been wanting that would be well-suited for one of these mythical "XNodes" would be a growable Array Size function, that returns 'n' scalar "dimension size" outputs, where 'n' is the number of dimensions of the array. I would much prefer this to the current method of dropping an Array Size and an Index Array.

-D

Link to comment

QUOTE(Darren @ May 23 2007, 08:00 PM)

The feature I've been wanting that would be well-suited for one of these mythical "XNodes" would be a growable Array Size function, that returns 'n' scalar "dimension size" outputs, where 'n' is the number of dimensions of the array. I would much prefer this to the current method of dropping an Array Size and an Index Array.

-D

The feature that I have already implemented as an XNode returns takes an n-dimension array and a scalar x and returns the (x+1)'th dimension of the array or -1 if x<0 or x>n-1. Fairly elementary stuff, but I got tired of wiring array-dimension and then index array together. It hadn't occurred to me to make it growable - but then so far I've kept my XNodes nice and simple and just made non-resizable ones :-).

Link to comment

Yesterday I discussed with a colleague of mine the need of an array XControl.

Currently editing an array is very cumbersome, for instance a cluster with several elements in an array is not editable with just the keyboard...

But AFAIK has the XControl no polymorphic abilities :(

Ton

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.