/[escript]/trunk/paso/src/Pattern.c
ViewVC logotype

Diff of /trunk/paso/src/Pattern.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2548 by jfenwick, Mon Jul 20 06:20:06 2009 UTC revision 2551 by gross, Thu Jul 23 09:19:15 2009 UTC
# Line 30  Line 30 
30    
31  /* allocates a Pattern  */  /* allocates a Pattern  */
32    
33  Paso_Pattern* Paso_Pattern_alloc(int type, dim_t input_block_size, dim_t output_block_size, dim_t numOutput, dim_t numInput, index_t* ptr, index_t* index) {  Paso_Pattern* Paso_Pattern_alloc(int type, dim_t numOutput, dim_t numInput, index_t* ptr, index_t* index) {
34    Paso_Pattern *out=NULL;    Paso_Pattern *out=NULL;
35    index_t index_offset=(type & PATTERN_FORMAT_OFFSET1 ? 1:0);    index_t index_offset=(type & PATTERN_FORMAT_OFFSET1 ? 1:0);
36    index_t loc_min_index,loc_max_index,min_index=index_offset,max_index=index_offset-1;    index_t loc_min_index,loc_max_index,min_index=index_offset,max_index=index_offset-1;
# Line 92  Paso_Pattern* Paso_Pattern_alloc(int typ Line 92  Paso_Pattern* Paso_Pattern_alloc(int typ
92        out->numInput=numInput;        out->numInput=numInput;
93        out->ptr=ptr;        out->ptr=ptr;
94        out->index=index;        out->index=index;
95        out->input_block_size=input_block_size;  
       out->output_block_size=output_block_size;  
       out->block_size=out->input_block_size * out->output_block_size;  
96        if (out->ptr == NULL) {        if (out->ptr == NULL) {
97            out->len=0;            out->len=0;
98        } else {        } else {
# Line 378  Paso_Pattern* Paso_IndexList_createPatte Line 376  Paso_Pattern* Paso_IndexList_createPatte
376                for(i=n0;i<n;++i) {                for(i=n0;i<n;++i) {
377                    Paso_IndexList_toArray(&index_list[i],&index[ptr[i-n0]],range_min,range_max,index_offset);                    Paso_IndexList_toArray(&index_list[i],&index[ptr[i-n0]],range_min,range_max,index_offset);
378                }                }
379                out=Paso_Pattern_alloc(PATTERN_FORMAT_DEFAULT,1,1,n-n0,range_max+index_offset,ptr,index);                out=Paso_Pattern_alloc(PATTERN_FORMAT_DEFAULT,n-n0,range_max+index_offset,ptr,index);
380         }         }
381    }    }
382    if (! Paso_noError()) {    if (! Paso_noError()) {

Legend:
Removed from v.2548  
changed lines
  Added in v.2551

  ViewVC Help
Powered by ViewVC 1.1.26