Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3998395
containers.xreate
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 9, 12:02 AM
Size
810 B
Mime Type
text/x-java
Expires
Sat, Jul 11, 12:02 AM (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
272563
Attached To
rXR Xreate
containers.xreate
View Options
/*
*
* Show-case for a automatic adjustment of container implementations based on actual operations.
* Possible implementations: llvm_array, llvm_const_array, on_the_fly(unwinded container)
*
*/
pass(dfa) {
operator map: (op(seqaccess)) -> impl(solid);
operator list_range: ()->impl(on_the_fly);
operator list: ()->impl(solid);
operator fold: (op(seqaccess));
operator index: (op(randaccess));
/* operator map: (op(seqaccess)) -> impl(llvm_array | on_the_fly); */
}
import raw("core/containers.lp");
testfunc = function: ()->bool
{
a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] : [num];
a2 = [1 .. 100] : [num];
b = loop map (a1 -> el: num) : [num]
{2 * el;};
c = b : [num];
d = loop fold (a2->el: num, 0->acc: num): [num]
{acc + el;};
c[5]==d;
}
Event Timeline
Log In to Comment