2 Replies Latest reply on Mar 17, 2009 2:12 PM by ryta1203

    CAL resource allocation

    ryta1203

      Is it possible to somehow use arrays for mapping resources on the CAL side, such as:

       

       

       

       

       

       

       

       

       

       

       

      CALresource inLocal[8], outLocal;

       

       

      for

      (i=0;i<num_inputs;i++)

      {

      inLocal = 0;

       



       

      if

      (calResAllocLocal2D(&inLocal, device, cal_size, cal_size, CAL_FORMAT_FLOAT_1, 0) != CAL_RESULT_OK)

      fprintf(stderr,



       

      "error occured allocating resource inLocal %d"

      , i);

      }

       



       

      //if(calResAllocLocal2D(&inLocal, device, cal_size, cal_size, CAL_FORMAT_FLOAT_1, 0) != CAL_RESULT_OK)

       

       

      // fprintf(stderr, "error occured allocating resource inLocal");

       

       

      //if(calResAllocLocal2D(&in2Local, device, cal_size, cal_size, CAL_FORMAT_FLOAT_1, 0) != CAL_RESULT_OK)

       

       

      // fprintf(stderr, "error occured allocating resource in2Local");

       

       

      if

      (calResAllocLocal2D(&outLocal, device, cal_size, cal_size, CAL_FORMAT_FLOAT_1, 0) != CAL_RESULT_OK)

      fprintf(stderr,



       

      "error occured allocating resource outLocal"

      );