Changeset 12595


Ignore:
Timestamp:
07/02/12 10:30:53 (13 years ago)
Author:
Mathieu Morlighem
Message:

Fixing initialization of string options

Location:
issm/trunk-jpl/src/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp

    r12446 r12595  
    176176int MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){
    177177
    178         int  i,j,rows,cols;
    179         int  numel,ndims;
    180         int *size,*dims;
    181         mxChar* mxmatrix_ptr=NULL;
    182         const mwSize* ipt=NULL;
     178        int           i,j,rows,cols;
     179        int           numel,ndims;
     180        int          *size , *dims;
     181        mxChar       *mxmatrix_ptr = NULL;
     182        const mwSize *ipt          = NULL;
    183183
    184184        /*output: */
     
    186186
    187187        /*matlab indices: */
    188         mwIndex*    ir=NULL;
    189         mwIndex*    jc=NULL;
    190         char*   pm=NULL;
    191         int     count;
    192         int     nnz;
    193         int     nz;
     188        mwIndex *ir    = NULL;
     189        mwIndex *jc    = NULL;
     190        char    *pm    = NULL;
     191        int      count;
     192        int      nnz;
     193        int      nz;
    194194
    195195        /*get Matlab matrix information: */
     
    233233                /*Create serial matrix: */
    234234                matrix=xNew<char>(numel+1);
     235                matrix[numel]='\0';
    235236
    236237                /*looping code adapted from Matlab example explore.c: */
     
    257258                        }
    258259                }
    259 
    260260        }
    261261
  • issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp

    r12511 r12595  
    190190                localpercent=percent[0];
    191191                for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
    192                 _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
     192                if(my_thread==0) _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
    193193
    194194                /*Kriging interpolation*/
     
    239239                localpercent=percent[0];
    240240                for(i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
    241                 _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
     241                if(my_thread==0) _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
    242242
    243243                observations->InterpolationNearestNeighbor(&predictions[idx],x_interp[idx],y_interp[idx],radius);
     
    287287                localpercent=percent[0];
    288288                for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
    289                 _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
     289                if(my_thread==0) _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
    290290
    291291                observations->InterpolationIDW(&predictions[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,power);
Note: See TracChangeset for help on using the changeset viewer.