dapodom.c#17    Dapodometerodom;
#21    odom = (Dapodometer*)calloc(1,sizeof(Dapodometer));
#22    MEMCHECK(odom,NULL);
#23    odom->rank = (stopindex - startindex);
#24    for(i=0;i<odom->rank;i++) {
#25 odom->start[i] = segment->slices[i+startindex].first;
#26 odom->stride[i] = segment->slices[i+startindex].stride;
#27 odom->stop[i] = (segment->slices[i+startindex].last + 1);
#32 odom->count[i] = segment->slices[i+startindex].count;
#34 odom->declsize[i] = segment->slices[i+startindex].declsize;
#35 odom->index[i] = odom->start[i];
#37    return odom;
#46    Dapodometerodom = (Dapodometer*)calloc(1,sizeof(Dapodometer));
#47    MEMCHECK(odom,NULL);
#48    odom->rank = rank;
#49    assert(odom->rank <= NC_MAX_VAR_DIMS);
#50    for(i=0;i<odom->rank;i++) {
#58 odom->start[i] = istart;
#59 odom->stop[i] = istop;
#60 odom->stride[i] = istride;
#61 odom->declsize[i] = ideclsize;
#62 odom->index[i] = odom->start[i];
#64    return odom;
#68dapodom_free(Dapodometerodom)
#70    if(odom) free(odom);
#75dapodom_print(Dapodometerodom)
#81    if(odom->rank == 0) {
#83    } else for(i=0;i<odom->rank;i++) {
#85 (size_t)odom->index[i],
#86 (size_t)odom->start[i],
#87 (size_t)odom->stride[i],
#88 (size_t)odom->length[i]);
#96dapodom_more(Dapodometerodom)
#98    return (odom->index[0] < odom->stop[0]);
#103dapodom_count(Dapodometerodom)
#107    for(i=0;i<odom->rank;i++) {
#108 offset *= odom->declsize[i];
#109 offset += odom->index[i];
#115dapodom_next(Dapodometerodom)
#118    if(odom->rank == 0) return 0;
#119    for(i=odom->rank-1;i>=0;i--) {
#120        odom->index[i] += odom->stride[i];
#121        if(odom->index[i] < odom->stop[i]) break;
#123 odom->index[i] = odom->start[i]; /* reset this position*/
#130dapodom_varmcount(Dapodometerodom, const ptrdiff_tsteps, const size_t* declsizes)
#134    for(i=0;i<odom->rank;i++) {
#136 tmp = odom->index[i];
#137 tmp = tmp - odom->start[i];
#138 tmp = tmp / odom->stride[i];
#152dapodom_space(Dapodometerodom)
#156    for(i=0;i<odom->rank;i++) {
#157 count *= odom->size[i];
dapodom.h#31extern int dapodom_more(Dapodometerodom);
dvarget.c#32odom_init(struct GETodometerodom,
#37    memset(odom,0,sizeof(struct GETodometer));
#38    odom->rank = rank;
#39    assert(odom->rank <= NC_MAX_VAR_DIMS);
#40    for(i=0;i<odom->rank;i++) {
#41 odom->start[i] = (start != NULL ? start[i] : 0);
#42 odom->edges[i] = (edges != NULL ? edges[i] : 1);
#43 odom->stride[i] = (stride != NULL ? stride[i] : 1);
#44 odom->stop[i] = odom->start[i] + (odom->edges[i]*((size_t)odom->stride[i]));
#45 odom->index[i] = odom->start[i];
#53odom_more(struct GETodometerodom)
#55    return (odom->index[0] < odom->stop[0]);
#62odom_next(struct GETodometerodom)
#65    if(odom->rank == 0) return 0;
#66    for(i=odom->rank-1;i>=0;i--) {
#67        odom->index[i] += (size_t)odom->stride[i];
#68        if(odom->index[i] < odom->stop[i]) break;
#70 odom->index[i] = odom->start[i]; /* reset this position*/
#141   struct GETodometer odom;
#237   odom_init(&odom,rank,mystart,myedges,mystride);
#240   while(odom_more(&odom)) {
#243      localstatus = NC_get_vara(ncid,varid,odom.index,nc_sizevector1,memptr,memtype);
#252      odom_next(&odom);
dvarput.c#22odom_init(struct PUTodometerodom,
#27    memset(odom,0,sizeof(struct PUTodometer));
#28    odom->rank = rank;
#29    assert(odom->rank <= NC_MAX_VAR_DIMS);
#30    for(i=0;i<odom->rank;i++) {
#31 odom->start[i] = (start != NULL ? start[i] : 0);
#32 odom->edges[i] = (edges != NULL ? edges[i] : 1);
#33 odom->stride[i] = (stride != NULL ? stride[i] : 1);
#34 odom->stop[i] = odom->start[i] + (odom->edges[i]*(size_t)odom->stride[i]);
#35 odom->index[i] = odom->start[i];
#40odom_more(struct PUTodometerodom)
#42    return (odom->index[0] < odom->stop[0]);
#46odom_next(struct PUTodometerodom)
#49    if(odom->rank == 0) return 0;
#50    for(i=odom->rank-1;i>=0;i--) {
#51        odom->index[i] += (size_t)odom->stride[i];
#52        if(odom->index[i] < odom->stop[i]) break;
#54 odom->index[i] = odom->start[i]; /* reset this position*/
#127   struct PUTodometer odom;
#246   odom_init(&odom,rank,mystart,myedges,mystride);
#249   while(odom_more(&odom)) {
#252      localstatus = NC_put_vara(ncid,varid,odom.index,nc_sizevector1,memptr,memtype);
#261      odom_next(&odom);
generate.c#44checkodom(Odometerodom)
#47    for(i=0;i<odom->rank;i++) {
#48 ASSERT(odom->index[i] == odom->start[i]+odom->count[i]);
#87    Odometerodom;
#103        odom = newodometer(dimset,NULL,NULL);
#104 start = odometerstartvector(odom);
#105 count = odometercountvector(odom);
#139    Odometerodom = NULL;
#154            odom = newodometer(dimset,NULL,NULL);
#155            writer(generator,vsym,code,odom->rank,odom->start,odom->count);
#157            writer(generator,vsym,code,odom->rank,0,bbLength(charbuf));
#166            odom = newodometer(dimset,NULL,NULL);
#169                nelems=nc_next_iter(&iter,odometerstartvector(odom),odometercountvector(odom));
#180                writer(generator,vsym,code,rank,odom->start,odom->count);
#186        odom = newodometer(dimset,NULL,NULL);
#189            size_t nelems=nc_next_iter(&iter,odom->start,odom->count);
#192                            odom,
#196            writer(generator,vsym,code,odom->rank,odom->start,odom->count);
#199    if(odom != NULL)
#200        odometerfree(odom);
#216               Odometerodom,
#244            subodom = newsubodometer(odom,dimset,dimindex,rank);
#264        subodom = newsubodometer(odom,dimset,dimindex,nextunlimited);
#271                generate_arrayr(vsym,code,filler,odom,nextunlimited,NULL,generator);
#275                generate_arrayr(vsym,code,sublist,odom,nextunlimited,filler,generator);
getvara.c#497    Dapodometerodom = NULL;
#541            odom = dapodom_fromsegment(segment,0,segment->rank);
#542            while(dapodom_more(odom)) {
#545                                            odom->index,&dimcontent);
#552                dapodom_next(odom);
#554            dapodom_free(odom);
#555     odom = NULL;
#573            odom = dapodom_fromsegment(segment,0,1);
#574     while(dapodom_more(odom)) {
#575 size_t recordindex = dapodom_count(odom);
#588 dapodom_next(odom);
#613    if(odomdapodom_free(odom);
#694wholeslicepoint(Dapodometerodom)
#698    for(point=-1,i=0;i<odom->rank;i++) {
#699        ASSERT((odom->size[i] != 0));
#700        if(odom->start[i] != 0 || odom->stride[i] != 1
#701           || odom->count[i] != odom->size[i])
#706    else if(point == (odom->rank - 1))
#767    Dapodometerodom = NULL;
#831     odom = dapodom_fromsegment(segment,0,safeindex);
#834     while(dapodom_more(odom)) {
#835         ocstat = oc_data_readn(conn,currentcontent,odom->index,count,internlen,memory->next);
#838         dapodom_next(odom);
#840            dapodom_free(odom);
#848            odom = dapodom_fromsegment(segment,0,rank0);
#849     while(dapodom_more(odom)) {
#851         ocstat = oc_data_readn(conn,currentcontent,odom->index,1,interntypesize,value);
#856         dapodom_next(odom);
#858            dapodom_free(odom);
#866            odom = dapodom_fromsegment(segment,0,rank0);
#867     while(dapodom_more(odom)) {
#869         ocstat = oc_data_readn(conn,currentcontent,odom->index,1,interntypesize,value);
#874         dapodom_next(odom);
#876            dapodom_free(odom);
#949    Dapodometerodom = NULL;
#966        odom = dapodom_fromsegment(segment,0,rank0);
#967        while(dapodom_more(odom)) {
#969     ocstat = oc_data_readn(conn,currentcontent,odom->index,1,sizeof(value),&value);
#973            dapodom_next(odom);
#975        dapodom_free(odom);
#976 odom = NULL;
#1222    Dapodometerodom = NULL;
#1339    odom = dapodom_new(ncrank,start,edges,stride,NULL);
#1343 size_t voffset = dapodom_varmcount(odom,map,dimsizes);
#1354 dapodom_next(odom);
#1357    odom = dapodom_new(ncrank,start,edges,stride,NULL);
#1358    while(dapodom_more(odom)) {
#1359 size_t* indexset = odom->index;
#1360 size_t voffset = dapodom_varmcount(odom,map,dimsizes);
#1378 dapodom_next(odom);
nc_iter.c#23     size_t* odom);
#184     size_t* odom  /* The "odometer" vector to be updated */
#193    odom[incdim] += inc;
#195 if(odom[id] >= dims[id]) {
#196     odom[id-1]++;
#197     odom[id] -= dims[id];
#200    if (odom[0] >= dims[0])
nciter.c#119     size_t* odom  /* The "odometer" vector to be updated */
#128    odom[incdim] += inc;
#130 if(odom[id] >= dims[id]) {
#131     odom[id-1]++;
#132     odom[id] -= dims[id];
#135    if (odom[0] >= dims[0])
#149     size_t* odom  /* The "odometer" vector to be updated */
#156    odom[incdim] += chunks[incdim];
#158 if(odom[id] >= dims[id]) {
#159     odom[id-1] += chunks[id-1];
#161     odom[id] = 0;
#164    if (odom[0] >= dims[0])
odom.c#18    Odometerodom;
#21    odom = (Odometer*)emalloc(sizeof(Odometer));
#22    if(odom == NULL) return NULL;
#23    odom->origin = odom;
#24    odom->offset = 0;
#25    odom->rank = dimset->ndims;
#26    ASSERT(odom->rank <= NC_MAX_VAR_DIMS);
#27    for(i=0;i<odom->rank;i++) {
#28 odom->declsize[i] = dimset->dimsyms[i]->dim.declsize;
#29 odom->start[i] = (startp == NULL ? 0
#31 odom->count[i] = (countp == NULL ? odom->declsize[i]
#33 odom->index[i] = odom->start[i];
#35 ASSERT(odom->start[i] + odom->count[i] <= odom->declsize[i]);
#37    return odom;
#43    Odometerodom;
#47    odom = (Odometer*)emalloc(sizeof(Odometer));
#48    if(odom == NULL) return NULL;
#49    odom->origin = origin;
#50    odom->offset = start;
#51    odom->rank = (stop - start);
#52    ASSERT(odom->rank <= NC_MAX_VAR_DIMS);
#53    return odom;
#57odometerfree(Odometerodom)
#59    if(odomefree(odom);
#63odometerprint(Odometerodom)
#69    if(odom->origin->rank == 0) {
#71    } else for(i=0;i<odom->rank;i++) {
#72 int ioffset = i + odom->offset;
#74 (unsigned long)odom->origin->index[ioffset],
#75 (unsigned long)odom->origin->start[ioffset],
#76 (unsigned long)odom->origin->declsize[ioffset],
#77 (unsigned long)odom->origin->count[ioffset]
#85odometermore(Odometerodom)
#88    int offset = odom->offset;
#89    ASSERT(odom->rank > 0);
#90    index = odom->origin->index[offset];
#91    start = odom->origin->start[offset];
#92    count = odom->origin->count[offset];
#95    odom->origin->index[offset] = odom->origin->start[offset];
#100odometerincr(Odometerodom)
#103    int last = odom->rank-1;
#104    ASSERT(odom->rank > 0);
#106 int ioffset = i+odom->offset;
#107        odom->origin->index[ioffset]++;
#108 if(odom->origin->index[ioffset]
#109           < (odom->origin->start[ioffset]
#110              +odom->origin->count[ioffset]))
#113 odom->origin->index[ioffset] = odom->origin->start[ioffset];
#131odometeroffset(Odometerodom)
#135    for(i=0;i<odom->rank;i++) {
#136 int ioffset = i+odom->offset;
#137 if(i > 0) count *= odom->origin->declsize[ioffset];
#138 count += odom->origin->index[ioffset];
#148odometerstartvector(Odometerodom)
#150    return odom->start;
#158odometercountvector(Odometerodom)
#160    return odom->count;
odom.h#30extern char* odometerprint(Odometerodom);
#32extern int odometermore(Odometerodom);
#33extern int odometerincr(Odometerodom);
#34extern size_t odometeroffset(Odometerodom);
#35extern size_t* odometerstartvector(Odometerodom);
#36extern size_t* odometercountvector(Odometerodom);
test_partvar.c#55static void odom_reclaim(Odomodom);
#56static void odom_set(Odomodom, size_t* start, size_t* count);
#57static int odom_more(Odomodom);
#58static int odom_incr(Odomodom);
#59static size_t odom_count(Odomodom);
#173    Odomodom = odom_create(RANK);
#176    odom_set(odom,start,count);
#177    while(odom_more(odom)) {
#178 size_t offset = odom_count(odom);
#185        odom_incr(odom);
#187    odom_reclaim(odom);
#194    Odomodom = (Odom*)malloc(sizeof(Odom));
#196    odom->rank = rank;
#197    odom->index = (size_t*)calloc(sizeof(size_t)*rank,1);
#198    odom->stop = (size_t*)calloc(sizeof(size_t)*rank,1);
#199    odom->start = (size_t*)calloc(sizeof(size_t)*rank,1);
#200    odom->count = (size_t*)calloc(sizeof(size_t)*rank,1);
#201    return odom;
#205odom_reclaim(Odomodom)
#207    free(odom->index);
#208    free(odom->stop);
#209    free(odom->start);
#210    free(odom->count);
#211    free(odom);
#215odom_set(Odomodom, size_t* start, size_t* count)
#219    for(i=0;i<odom->rank;i++) {
#220        odom->start[i] = start[i];
#221        odom->count[i] = count[i];
#223    for(i=0;i<odom->rank;i++) {
#224        odom->index[i] = odom->start[i];
#225        odom->stop[i] =  odom->start[i] + odom->count[i];
#230odom_more(Odomodom)
#232    return (odom->index[0] < odom->stop[0]?1:0);
#236odom_incr(Odomodom)
#239    if(odom->rank == 0) return 0;
#240    for(i=odom->rank-1;i>=0;i--) {
#241        odom->index[i]++;
#242        if(odom->index[i] < odom->stop[i]) break;
#244 odom->index[i] = odom->start[i]; /* reset this position*/
#251odom_count(Odomodom)
#255    for(i=0;i<odom->rank;i++) {
#256 offset *= odom->count[i];
#257 offset += odom->index[i];
test_vara.c#51static void odom_reclaim(Odomodom);
#52static void odom_set(Odomodom, size_t* start, size_t* count);
#53static int odom_more(Odomodom);
#54static int odom_incr(Odomodom);
#55static size_t odom_count(Odomodom);
#131    Odomodom = odom_create(RANK);
#134    odom_set(odom,start,count);
#135    while(odom_more(odom)) {
#136 size_t offset = odom_count(odom);
#142        odom_incr(odom);
#144    odom_reclaim(odom);
#150    Odomodom = (Odom*)malloc(sizeof(Odom));
#152    odom->rank = rank;
#153    odom->index = (size_t*)calloc(sizeof(size_t)*rank,1);
#154    odom->stop = (size_t*)calloc(sizeof(size_t)*rank,1);
#155    odom->start = (size_t*)calloc(sizeof(size_t)*rank,1);
#156    odom->count = (size_t*)calloc(sizeof(size_t)*rank,1);
#157    return odom;
#160static void odom_reclaim(Odomodom)
#162    free(odom->index);
#163    free(odom->stop);
#164    free(odom->start);
#165    free(odom->count);
#166    free(odom);
#170static void odom_set(Odomodom, size_t* start, size_t* count)
#174    for(i=0;i<odom->rank;i++) {
#175        odom->start[i] = start[i];
#176        odom->count[i] = count[i];
#178    for(i=0;i<odom->rank;i++) {
#179        odom->index[i] = odom->start[i];
#180        odom->stop[i] =  odom->start[i] + odom->count[i];
#184static int odom_more(Odomodom)
#186    return (odom->index[0] < odom->stop[0]?1:0);
#189static int odom_incr(Odomodom)
#192    if(odom->rank == 0) return 0;
#193    for(i=odom->rank-1;i>=0;i--) {
#194        odom->index[i]++;
#195        if(odom->index[i] < odom->stop[i]) break;
#197 odom->index[i] = odom->start[i]; /* reset this position*/
#203static size_t odom_count(Odomodom)
#207    for(i=0;i<odom->rank;i++) {
#208 offset *= odom->count[i];
#209 offset += odom->index[i];
vardata.c#392     size_t* odom, /* The "odometer" vector to be updated */
#400 odom[id] += add[id];
#401 if(odom[id] >= dims[id]) {
#402     odom[id-1]++;
#403     odom[id] -= dims[id];
#406    odom[0] += add[0];
#407    if (odom[0] >= dims[0])


HyperKWIC - Version 7.20DA executed at 11:37 on 27 Oct 2017 | Polyhedron Solutions - INTERNAL USE | COMMERCIAL (Any O/S) SN 4AKIed