Example demonstrating non-collective global memory allocation.
#include <unistd.h>
#include <iostream>
#include <libdash.h>
#define SIZE 10
int main(int argc, char* argv[])
{
arr[
myid] = dash::memalloc<int>(SIZE);
for (int i = 0; i < SIZE; i++) {
pointer_t ptr = arr[
myid];
}
for (int i = 0; i < SIZE; i++) {
pointer_t ptr = arr[(myid+1) %
size];
cout << (int)ptr[i] << " ";
}
cout << endl;
}