Changes between Version 7 and Version 8 of OpenMPTransformation


Ignore:
Timestamp:
04/20/14 11:28:06 (12 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenMPTransformation

    v7 v8  
    3636* `omp_get_thread_num()`
    3737
     38== Helper primitives ==
     39
     40Here are some new proposed CIVL abstract datatypes that may be helpful.
     41
     42Handle type `$intseq`, representing a finite sequence of integers:
     43{{{
     44$intseq $intseq_empty(); // returns empty sequence
     45$intseq $intseq_add($intseq seq, int m); // appends m to sequence
     46$intseq $intseq_remove($intseq seq, int i); // removes i-th element
     47int $intseq_get($intseq seq, int i); // returns i-th element
     48$intseq $intseq_set($intseq seq, int index, int value); // sets i-th element
     49$intseq $intseq_insert($intseq seq, int index, int value); // inserts at index i
     50int $intseq_length($intseq seq); // returns length of seq
     51}}}
     52
     53Handle type `$distribution`, representing a distribution of n things into k disjoint sequences:
     54
     55{{{
     56/* distribute the integers 0,1,...,n-1 into k sequences NONDETERMINISTICALLY */
     57$distribution $distribute(int n, int k);
     58$intseq $distribution_get(int i);
     59}}}
     60
     61We can play with different implementations of the distribute function.  On one extreme, it can return an arbitrary distribution; this will allow exploration of all possible executions of an OpenMP for loop.   On the other extreme, we can sacrifice soundness for tractability and have it used a fixed strategy, like round-robin with chunk size 1.  And various things in between.
     62
    3863== Translation Strategies ==
    3964