Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-14803

Efficient array handling (small row)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Accepted
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Code Generator
    • Labels:
    • Compatibility:
      Minor

      Description

      Given something like:

      RealRec := RECORD // single element, but could be a few fields
           REAL8 v;
      END;
      MyData := RECORD
           UNSIGNED id;
           DATASET(RealRec) phi_array;
           DATASET(RealRec) gamma_array;
           DATASET(RealRec) result;
      END;
      RealRec prod(RealRec phi, RealRec gamma) := TRANSFORM
           SELF.v := phi.v * gamma.v;
      END;
      MyRec phi_gamma(MyRec rec) := TRANSFORM
           SELF.result := COMBINE(rec.phi_array, rec.gamma_array,
                                                     prod(LEFT,RIGHT));
           SELF := rec;
      END;
      new_ds := PROJECT(ds, phi_gamma(LEFT));
      

      I would think that the generated code would allocate a buffer for the resulting child dataset, and then traverse the arrays.

      This raises several issues:

      • implementing combine inline
      • best representation for datasets with very small rows.
      • preallocating target datasets when the size is known. (Both inline and out of line.)
      • generating code that can support vector operations.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ghalliday Gavin Halliday
                Reporter:
                johnholt John Holt
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: