Differences between revisions 4 and 5
Revision 4 as of 2008-02-14 16:50:45
Size: 1041
Editor: dcesarsky
Comment:
Revision 5 as of 2009-07-15 14:32:36
Size: 1041
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

= Array2grp_1

// Purpose: Utility to create  grp_1 tuples out of 1D arrays.
//          Many PACS TCs require a grp_1 argument. grp_1 objects are
//          defined as "1 element" tuples, which conceptually is the same as a 1D
//          array. The checksum function, on the other hand, which is used to checksum
//          some PACS operands, acts on 1D arrays. So a grp_1 list cannot be checksummed
//          unless a 1D array is created from the grp_1. This is error prone as the
//          following construct is needed in many CUS instances:
//
//     // TC operand
//           {int}[] spu_par = [{ppf},{ppp},{tfp},{tcp}];
//
//     // Check sum argument array
//            int aux = [ppf,ppp,tfp,tcp];
//            int check_sum = checksum("int",aux);
//
//        The utility Array2grp_1 will create "spu_par " given the array aux as input:
//
//        {int} [] spu_par = Array2grp_1(aux);
//

Input variable(s):

{int}[] procedure Array2grp_1 {
    int[] array_in = [0,1,2,3];
}{

Herschel: PACS/CUSPVscripts/Array2grp (last edited 2009-07-15 14:32:36 by localhost)