constraints.c#24dapparsedapconstraints(NCDAPCOMMONdapcomm, char* constraints,
#845dapcomputeprojectedvars(NCDAPCOMMONdapcommDCEconstraintconstraint)
#853    if(dapcomm->cdf.projectedvars != NULL)
#854 nclistfree(dapcomm->cdf.projectedvars);
#855    dapcomm->cdf.projectedvars = vars;
getvara.c#103    NCDAPCOMMONdapcomm;
#127    dapcomm = (NCDAPCOMMON*)drno->dispatchdata;
#133    varnodes = dapcomm->cdf.ddsroot->tree->varnodes;
#148   if(FLAGSET(dapcomm->controls,NCF_PREFETCH)
#149      && !FLAGSET(dapcomm->controls,NCF_PREFETCH_EAGER)) {
#150        if(dapcomm->cdf.cache != NULL && dapcomm->cdf.cache->prefetch == NULL) {
#151            ncstat = prefetchdata(dapcomm);
#246    ncstat = makegetvar(dapcomm,cdfvar,data,dsttype,&varainfo);
#260    ncstat = daprestrictprojection(dapcomm->oc.dapconstraint->projections,
#273    if(iscached(dapcomm,cdfvar,&cachenode)) { /* ignores non-whole variable cache entries */
#282    } else if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE)) {
#285        if(FLAGSET(dapcomm->controls,NCF_WHOLEVAR))
#306        ncstat = buildcachenode(dapcomm,fetchconstraint,vars,&cachenode,0);
#319        ncstat = daprestrictprojection(dapcomm->oc.dapconstraint->projections,
#335        fetchconstraint->selections = dceclonelist(dapcomm->oc.dapconstraint->selections);
#345 ncstat = buildcachenode(dapcomm,fetchconstraint,vars,&cachenode,0);
#353        ncstat = daprestrictprojection(dapcomm->oc.dapconstraint->projections,
#371        fetchconstraint->selections = dceclonelist(dapcomm->oc.dapconstraint->selections);
#381        ncstat = buildcachenode(dapcomm,fetchconstraint,vars,&cachenode,0);
#397    unattach(dapcomm->cdf.ddsroot);
#398    ncstat = attachsubset(cachenode->datadds,dapcomm->cdf.ddsroot);
#416    ncstat = moveto(dapcomm,varainfo,varainfo->cache->datadds,data);
#1215    NCDAPCOMMONdapcomm;
#1232    dapcomm = (NCDAPCOMMON*)drno->dispatchdata;
#1242    varnodes = dapcomm->cdf.ddsroot->tree->varnodes;
ncd2dispatch.c#301    NCDAPCOMMONdapcomm = NULL;
#311    dapcomm = (NCDAPCOMMON*)calloc(1,sizeof(NCDAPCOMMON));
#312    if(dapcomm == NULL) {ncstat = NC_ENOMEM; goto done;}
#314    NCD2_DATA_SET(drno,dapcomm);
#316    dapcomm->controller = (NC*)drno;
#318    dapcomm->cdf.separator = ".";
#319    dapcomm->cdf.smallsizelimit = DFALTSMALLLIMIT;
#320    dapcomm->cdf.cache = createnccache();
#325 dapcomm->cdf.cache->cachecount = (size_t)(rl.rlim_cur / 2);
#332    dapcomm->oc.rawurltext = (char*)emalloc(strlen(path)+strlen("[compile]")+1);
#333    strcpy(dapcomm->oc.rawurltext,"[compile]");
#334    strcat(dapcomm->oc.rawurltextpath);
#336    dapcomm->oc.rawurltext = strdup(path);
#339    ncuriparse(dapcomm->oc.rawurltext,&dapcomm->oc.url);
#342    ncuridecodeparams(dapcomm->oc.url);
#344    if(!constrainable(dapcomm->oc.url))
#345 SETFLAG(dapcomm->controls,NCF_UNCONSTRAINABLE);
#351 if(dapcomm->oc.url->host != NULL) {
#352     for(p=dapcomm->oc.url->host;*p;p++) {
#354     SETFLAG(dapcomm->controls,NCF_COLUMBIA);
#361    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE)) {
#362 if(dapcomm->oc.url->constraint != NULL) {
#364    dapcomm->oc.url->constraint);
#391 dapcomm->nc3id = nc3id;
#397    dapcomm->oc.dapconstraint = (DCEconstraint*)dcecreate(CES_CONSTRAINT);
#398    dapcomm->oc.dapconstraint->projections = nclistnew();
#399    dapcomm->oc.dapconstraint->selections = nclistnew();
#402     ncstat = dapparsedapconstraints(dapcomm,dapcomm->oc.url->constraint,dapcomm->oc.dapconstraint);
#406    dapcomm->oc.urltext = ncuribuild(dapcomm->oc.url,NULL,NULL,
#410    ocstat = oc_open(dapcomm->oc.urltext,&dapcomm->oc.conn);
#414    (void)oc_trace_curl(dapcomm->oc.conn);
#417    nullfree(dapcomm->oc.urltext); /* clean up */
#418    dapcomm->oc.urltext = NULL;
#421    applyclientparamcontrols(dapcomm);
#424    if((value = dapparamvalue(dapcomm,"log")) != NULL) {
#435    ncstat = fetchpatternmetadata(dapcomm);
#441    ncstat = computecdfnodesets(dapcomm,dapcomm->cdf.fullddsroot->tree);
#445    ncstat = definedimsettrans(dapcomm,dapcomm->cdf.fullddsroot->tree);
#449    ncstat = markprefetch(dapcomm);
#452    ncstat = fetchconstrainedmetadata(dapcomm);
#456fprintf(stderr,"constrained dds: %s\n",dumptree(dapcomm->cdf.ddsroot));
#462    ncstat = computecdfnodesets(dapcomm,dapcomm->cdf.ddsroot->tree);
#466    ncstat = fixgrids(dapcomm);
#470    ncstat = sequencecheck(dapcomm);
#474    ncstat = suppressunusablevars(dapcomm);
#478    ncstat = applyclientparams(dapcomm);
#482    ncstat = addstringdims(dapcomm);
#485    if(nclistlength(dapcomm->cdf.ddsroot->tree->seqnodes) > 0) {
#487        ncstat = defseqdims(dapcomm);
#492    ncstat = definedimsets(dapcomm,dapcomm->cdf.ddsroot->tree);
#496    ncstat = computecdfdimnames(dapcomm);
#500    ncstat = fixzerodims(dapcomm);
#507    ncstat = defrecorddim(dapcomm);
#509    if(dapcomm->cdf.recorddimname != NULL
#510       && nclistlength(dapcomm->cdf.ddsroot->tree->seqnodes) > 0) {
#516    ncstat = computecdfvarnames(dapcomm,
#517  dapcomm->cdf.ddsroot,
#518  dapcomm->cdf.ddsroot->tree->varnodes);
#522    ncstat = dimimprint(dapcomm);
#527    ncstat = dapmapconstraints(dapcomm->oc.dapconstraint,dapcomm->cdf.ddsroot);
#531    ncstat = dapfixprojections(dapcomm->oc.dapconstraint->projections);
#535    ncstat = dapqualifyconstraints(dapcomm->oc.dapconstraint);
#539    ncstat = dapcomputeprojectedvars(dapcomm,dapcomm->oc.dapconstraint);
#543    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE)) {
#545 dapcomm->oc.urltext = ncuribuild(dapcomm->oc.url,NULL,NULL,0);
#547 char* constraintstring = dcebuildconstraintstring(dapcomm->oc.dapconstraint);
#548        ncurisetconstraints(dapcomm->oc.url,constraintstring);
#550        dapcomm->oc.urltext = ncuribuild(dapcomm->oc.url,NULL,NULL,NCURICONSTRAINTS);
#554fprintf(stderr,"ncdap3: final constraint: %s\n",dapcomm->oc.url->constraint);
#558    estimatevarsizes(dapcomm);
#561    ncstat = buildncstructures(dapcomm);
#576     CDFnodeunlimited = dapcomm->cdf.recorddim;
#592    if(FLAGSET(dapcomm->controls,NCF_PREFETCH)
#593       && FLAGSET(dapcomm->controls,NCF_PREFETCH_EAGER)) {
#594        ncstat = prefetchdata(dapcomm);
#613    NCDAPCOMMONdapcomm;
#618    dapcomm = (NCDAPCOMMON*)drno->dispatchdata;
#626    freeNCDAPCOMMON(dapcomm);
#634buildncstructures(NCDAPCOMMONdapcomm)
#637    CDFnodedds = dapcomm->cdf.ddsroot;
#640    ncstat = buildglobalattrs(dapcomm,dds);
#643    ncstat = builddims(dapcomm);
#646    ncstat = buildvars(dapcomm);
#654builddims(NCDAPCOMMONdapcomm)
#660    NCdrno = dapcomm->controller;
#665    dimset = dapcomm->cdf.ddsroot->tree->dimnodes;
#685    if(dapcomm->cdf.recorddim != NULL) {
#686 CDFnodeunlimited = dapcomm->cdf.recorddim;
#688        ncstat = nc_def_dim(dapcomm->nc3id,
#696        ncstat = NC_check_id(dapcomm->nc3id,&ncsub);
#715        ncstat = nc_def_dim(dapcomm->nc3id,definename,dim->dim.declsize,&dimid);
#739buildvars(NCDAPCOMMONdapcomm)
#744    NClistvarnodes = dapcomm->cdf.ddsroot->tree->varnodes;
#745    NCdrno = dapcomm->controller;
#787        ncstat = nc_def_var(dapcomm->nc3id,
#802 ncstat = buildattribute(dapcomm,att,var->etype,varid);
#807 if(dapparamcheck(dapcomm,"show","projection"))
#808     showprojection(dapcomm,var);
#815buildglobalattrs(NCDAPCOMMONdapcommCDFnoderoot)
#823    NCdrno = dapcomm->controller;
#828     ncstat = buildattribute(dapcomm,att,NC_NAT,NC_GLOBAL);
#834    if(dapparamcheck(dapcomm,"show","seqdims")) {
#836        cdfnodes = dapcomm->cdf.ddsroot->tree->nodes;
#848            ncstat = nc_put_att_text(dapcomm->nc3id,NC_GLOBAL,"_sequence_dimensions",
#857    if(dapparamcheck(dapcomm,"show","translate")) {
#859        ncstat = nc_put_att_text(dapcomm->nc3id,NC_GLOBAL,"_translate",
#862    if(dapparamcheck(dapcomm,"show","url")) {
#863 if(dapcomm->oc.rawurltext != NULL)
#864            ncstat = nc_put_att_text(dapcomm->nc3id,NC_GLOBAL,"_url",
#865        strlen(dapcomm->oc.rawurltext),dapcomm->oc.rawurltext);
#867    if(dapparamcheck(dapcomm,"show","dds")) {
#869 if(dapcomm->cdf.ddsroot != NULL)
#870       txt = oc_tree_text(dapcomm->oc.conn,dapcomm->cdf.ddsroot->ocnode);
#875            ncstat = nc_put_att_text(dapcomm->nc3id,NC_GLOBAL,"_dds",strlen(nltxt),nltxt);
#879    if(dapparamcheck(dapcomm,"show","das")) {
#881 if(dapcomm->oc.ocdasroot != NULL)
#882     txt = oc_tree_text(dapcomm->oc.conn,dapcomm->oc.ocdasroot);
#886            ncstat = nc_put_att_text(dapcomm->nc3id,NC_GLOBAL,"_das",strlen(nltxt),nltxt);
#897buildattribute(NCDAPCOMMONdapcommNCattributeattnc_type vartype, int varid)
#902    NCdrno = dapcomm->controller;
#928     ncstat = nc_put_att_text(dapcomm->nc3id,varid,att->name,1,newstring);
#930     ncstat = nc_put_att_text(dapcomm->nc3id,varid,att->name,strlen(newstring),newstring);
#945     atype = nctypeconvert(dapcomm,vartype);
#947     atype = nctypeconvert(dapcomm,att->etype);
#960    ncstat = nc_put_att(dapcomm->nc3id,varid,att->name,atype,nvalues,mem);
#1406addstringdims(NCDAPCOMMONdapcomm)
#1415    NClistvarnodes = dapcomm->cdf.ddsroot->tree->varnodes;
#1422     (unsigned long)dapcomm->cdf.defaultstringlength);
#1423    globalsdim = makecdfnode(dapcommdimnameOC_DimensionNULL,
#1424                                 dapcomm->cdf.ddsroot);
#1425    nclistpush(dapcomm->cdf.ddsroot->tree->nodes,(void*)globalsdim);
#1427    globalsdim->dim.declsize = dapcomm->cdf.defaultstringlength;
#1429    globalsdim->dim.array = dapcomm->cdf.ddsroot;
#1432    dapcomm->cdf.globalstringdim = globalsdim;
#1449     sdim = dapcomm->cdf.globalstringdim; /* use default */
#1458     sdim = makecdfnode(dapcommdimnameOC_DimensionNULL,
#1459                                 dapcomm->cdf.ddsroot);
#1461     nclistpush(dapcomm->cdf.ddsroot->tree->nodes,(void*)sdim);
#1476defrecorddim(NCDAPCOMMONdapcomm)
#1482    if(dapcomm->cdf.recorddimname == NULL) return NC_NOERR; /* ignore */
#1484    basedims = dapcomm->cdf.ddsroot->tree->dimnodes;
#1487 if(strcmp(dim->ocname,dapcomm->cdf.recorddimname) != 0) continue;
#1489 dapcomm->cdf.recorddim = dim;
#1497defseqdims(NCDAPCOMMONdapcomm)
#1504    if(dapparamvalue(dapcomm,"noseqdims")) seqdims = 0;
#1515    for(i=0;i<nclistlength(dapcomm->cdf.ddsroot->tree->seqnodes);i++) {
#1516        CDFnodeseq = (CDFnode*)nclistget(dapcomm->cdf.ddsroot->tree->seqnodes,i);
#1530     ncstat = getseqdimsize(dapcomm,seq,&seqsize);
#1540            ncstat = makeseqdim(dapcomm,seq,seqsize,&sqdim);
#1552showprojection(NCDAPCOMMONdapcommCDFnodevar)
#1558    NCdrno = dapcomm->controller;
#1588getseqdimsize(NCDAPCOMMONdapcommCDFnodeseq, size_t* sizep)
#1592    OClink conn = dapcomm->oc.conn;
#1602    computeseqcountconstraints(dapcomm,seq,seqcountconstraints);
#1608    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE))
#1609        ncstat = dap_fetch(dapcomm,conn,NULL,OCDATADDS,&ocroot);
#1611        ncstat = dap_fetch(dapcomm,conn,ncbytescontents(seqcountconstraints),OCDATADDS,&ocroot);
#1614    ncstat = buildcdftree(dapcomm,ocroot,OCDATA,&dxdroot);
#1622    ncstat = countsequence(dapcomm,xseq,&seqsize);
#1630    unattach(dapcomm->cdf.ddsroot);
#1639 oc_svcerrordata(dapcomm->oc.conn,&code,&msg,&httperr);
#1658makeseqdim(NCDAPCOMMONdapcommCDFnodeseq, size_t countCDFnode** sqdimp)
#1665    sqdim = makecdfnode(dapcomm,seq->ocname,OC_Dimension,NULL,root);
#1680countsequence(NCDAPCOMMONdapcommCDFnodexseq, size_t* sizep)
#1687    OClink conn = dapcomm->oc.conn;
#1756freeNCDAPCOMMON(NCDAPCOMMONdapcomm)
#1758    freenccache(dapcomm,dapcomm->cdf.cache);
#1759    nclistfree(dapcomm->cdf.projectedvars);
#1760    nullfree(dapcomm->cdf.recorddimname);
#1763    freecdfroot(dapcomm->cdf.ddsroot);
#1764    dapcomm->cdf.ddsroot = NULL;
#1765    freecdfroot(dapcomm->cdf.fullddsroot);
#1766    dapcomm->cdf.fullddsroot = NULL;
#1767    if(dapcomm->oc.ocdasroot != NULL)
#1768        oc_root_free(dapcomm->oc.conn,dapcomm->oc.ocdasroot);
#1769    dapcomm->oc.ocdasroot = NULL;
#1770    oc_close(dapcomm->oc.conn); /* also reclaims remaining OC trees */
#1771    ncurifree(dapcomm->oc.url);
#1772    nullfree(dapcomm->oc.urltext);
#1773    nullfree(dapcomm->oc.rawurltext);
#1775    dcefree((DCEnode*)dapcomm->oc.dapconstraint);
#1776    dapcomm->oc.dapconstraint = NULL;
#1778    free(dapcomm);
#1806computeseqcountconstraints(NCDAPCOMMONdapcommCDFnodeseqNCbytesseqcountconstraints)
#1813    computeseqcountconstraintsr(dapcomm,seq,&var);
#1847    if(dapcomm->oc.url->selection != NULL)
#1848        ncbytescat(seqcountconstraints,dapcomm->oc.url->selection);
#1898computeseqcountconstraintsr(NCDAPCOMMONdapcommCDFnodenodeCDFnode** candidatep)
#1921        computeseqcountconstraintsr(dapcomm,compound,candidatep);
#1944estimatevarsizes(NCDAPCOMMONdapcomm)
#1950    for(ivar=0;ivar<nclistlength(dapcomm->cdf.ddsroot->tree->varnodes);ivar++) {
#1951        CDFnodevar = (CDFnode*)nclistget(dapcomm->cdf.ddsroot->tree->varnodes,ivar);
#1974    dapcomm->cdf.totalestimatedsize = totalsize;
#1978fetchpatternmetadata(NCDAPCOMMONdapcomm)
#1992    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE))
#1995        ce = nulldup(dapcomm->oc.url->selection);
#1998    ncstat = dap_fetch(dapcomm,dapcomm->oc.conn,ce,OCDDS,&ocroot);
#2003 if(strcmp(dapcomm->oc.url->protocol,"file") != 0) {
#2007        ncstat = dap_fetch(dapcomm,dapcomm->oc.conn,ce,OCDATADDS,&ocroot);
#2016    ncstat = dap_fetch(dapcomm,dapcomm->oc.conn,ce,OCDAS,&dapcomm->oc.ocdasroot);
#2020        dapcomm->oc.ocdasroot = NULL;
#2025    ncstat = buildcdftree(dapcomm,ocroot,OCDDS,&ddsroot);
#2027    dapcomm->cdf.fullddsroot = ddsroot;
#2031    if(dapcomm->oc.ocdasroot != NULL) {
#2032 ncstat = dapmerge(dapcomm,dapcomm->cdf.fullddsroot,
#2033                           dapcomm->oc.ocdasroot);
#2038fprintf(stderr,"full pattern:\n%s",dumptree(dapcomm->cdf.fullddsroot));
#2048fetchconstrainedmetadata(NCDAPCOMMONdapcomm)
#2056    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE))
#2059        ce = dcebuildconstraintstring(dapcomm->oc.dapconstraint);
#2061        ncstat = dap_fetch(dapcomm,dapcomm->oc.conn,ce,OCDDS,&ocroot);
#2065        ncstat = buildcdftree(dapcomm,ocroot,OCDDS,&ddsroot);
#2069 dapcomm->cdf.ddsroot = ddsroot;
#2072        if(!FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE)) {
#2074            ncstat = restruct(dapcommdapcomm->cdf.ddsroot,dapcomm->cdf.fullddsroot,dapcomm->oc.dapconstraint->projections);
#2079fprintf(stderr,"constrained:\n%s",dumptree(dapcomm->cdf.ddsroot));
#2083 if(dapcomm->oc.ocdasroot != NULL) {
#2084            ncstat = dapmerge(dapcomm,dapcomm->cdf.ddsroot,
#2085                               dapcomm->oc.ocdasroot);
#2090        ncstat = mapnodes(dapcomm->cdf.ddsroot,dapcomm->cdf.fullddsroot);
#2103suppressunusablevars(NCDAPCOMMONdapcomm)
#2112 for(i=nclistlength(dapcomm->cdf.ddsroot->tree->varnodes)-1;i>=0;i--) {
#2113     CDFnodevar = (CDFnode*)nclistget(dapcomm->cdf.ddsroot->tree->varnodes,i);
#2130        if(foundnclistremove(dapcomm->cdf.ddsroot->tree->varnodes,i);
#2142fixzerodims(NCDAPCOMMONdapcomm)
#2145    for(i=0;i<nclistlength(dapcomm->cdf.ddsroot->tree->varnodes);i++) {
#2146 CDFnodevar = (CDFnode*)nclistget(dapcomm->cdf.ddsroot->tree->varnodes,i);
#2162applyclientparamcontrols(NCDAPCOMMONdapcomm)
#2165    CLRFLAG(dapcomm->controls,NCF_CACHE);
#2166    CLRFLAG(dapcomm->controls,NCF_SHOWFETCH);
#2167    CLRFLAG(dapcomm->controls,NCF_NC3);
#2168    CLRFLAG(dapcomm->controls,NCF_NCDAP);
#2169    CLRFLAG(dapcomm->controls,NCF_PREFETCH);
#2170    CLRFLAG(dapcomm->controls,NCF_PREFETCH_EAGER);
#2173    SETFLAG(dapcomm->controls,DFALT_ON_FLAGS);
#2174    SETFLAG(dapcomm->controls,(NCF_NC3|NCF_NCDAP));
#2177    if(dapparamcheck(dapcomm,"cache",NULL))
#2178 SETFLAG(dapcomm->controls,NCF_CACHE);
#2179    else if(dapparamcheck(dapcomm,"nocache",NULL))
#2180 CLRFLAG(dapcomm->controls,NCF_CACHE);
#2183    if(dapparamcheck(dapcomm,"prefetch","eager")) {
#2184        SETFLAG(dapcomm->controls,NCF_PREFETCH);
#2185        SETFLAG(dapcomm->controls,NCF_PREFETCH_EAGER);
#2186    } else if(dapparamcheck(dapcomm,"prefetch","lazy")
#2187              || dapparamcheck(dapcomm,"prefetch",NULL)) {
#2188        SETFLAG(dapcomm->controls,NCF_PREFETCH);
#2189        CLRFLAG(dapcomm->controls,NCF_PREFETCH_EAGER);
#2190    } else if(dapparamcheck(dapcomm,"noprefetch",NULL))
#2191        CLRFLAG(dapcomm->controls,NCF_PREFETCH);
#2193    if(FLAGSET(dapcomm->controls,NCF_UNCONSTRAINABLE))
#2194 SETFLAG(dapcomm->controls,NCF_CACHE);
#2196    if(dapparamcheck(dapcomm,"show","fetch"))
#2197 SETFLAG(dapcomm->controls,NCF_SHOWFETCH);
#2199    nclog(NCLOGNOTE,"Caching=%d",FLAGSET(dapcomm->controls,NCF_CACHE));


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