Lines Matching refs:dt
263 kdt_subobj_t dt; member
269 kdt_subobj_t dt; member
275 kdt_subobj_t dt; member
281 kdt_subobj_t dt; member
287 kdt_subobj_t dt; member
293 kdt_subobj_t dt; member
434 kdt_subobj_t *dt; in kdtPosPInitialize() local
442 dt = &(dtposp->dt); in kdtPosPInitialize()
443 dt->type = PICOKDT_KDTTYPE_POSP; in kdtPosPInitialize()
444 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) { in kdtPosPInitialize()
447 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_POSP, in kdtPosPInitialize()
467 kdt_subobj_t *dt; in kdtPosDInitialize() local
475 dt = &(dtposd->dt); in kdtPosDInitialize()
476 dt->type = PICOKDT_KDTTYPE_POSD; in kdtPosDInitialize()
477 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) { in kdtPosDInitialize()
480 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_POSD, in kdtPosDInitialize()
500 kdt_subobj_t *dt; in kdtG2PInitialize() local
508 dt = &(dtg2p->dt); in kdtG2PInitialize()
509 dt->type = PICOKDT_KDTTYPE_G2P; in kdtG2PInitialize()
510 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) { in kdtG2PInitialize()
514 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_G2P, in kdtG2PInitialize()
534 kdt_subobj_t *dt; in kdtPhrInitialize() local
542 dt = &(dtphr->dt); in kdtPhrInitialize()
543 dt->type = PICOKDT_KDTTYPE_PHR; in kdtPhrInitialize()
544 if ((status = kdtDtInitialize(this, common,dt)) != PICO_OK) { in kdtPhrInitialize()
548 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_PHR, in kdtPhrInitialize()
568 kdt_subobj_t *dt; in kdtAccInitialize() local
576 dt = &(dtacc->dt); in kdtAccInitialize()
577 dt->type = PICOKDT_KDTTYPE_ACC; in kdtAccInitialize()
578 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) { in kdtAccInitialize()
582 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_ACC, in kdtAccInitialize()
602 kdt_subobj_t *dt; in kdtPamInitialize() local
610 dt = &(dtpam->dt); in kdtPamInitialize()
611 dt->type = PICOKDT_KDTTYPE_PAM; in kdtPamInitialize()
612 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) { in kdtPamInitialize()
616 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_PAM, in kdtPamInitialize()
1213 static picoos_uint8 kdtMapInFixed(const kdt_subobj_t *dt, in kdtMapInFixed() argument
1231 if (imtnr >= dt->inpmaptable[pos++]) { /* outside tablenr range? */ in kdtMapInFixed()
1233 dt->inpmaptable[pos-1], imtnr)); in kdtMapInFixed()
1239 pos = dt->beg_offset[imtnr]; in kdtMapInFixed()
1243 lentable = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 | in kdtMapInFixed()
1244 dt->inpmaptable[pos]; in kdtMapInFixed()
1249 if (dt->inpmaptable[pos] == PICOKDT_MTTYPE_EMPTY) { in kdtMapInFixed()
1254 } else if (dt->inpmaptable[pos] == PICOKDT_MTTYPE_BYTE) { in kdtMapInFixed()
1256 } else if (dt->inpmaptable[pos] == PICOKDT_MTTYPE_WORD) { in kdtMapInFixed()
1260 PICODBG_ERROR(("wrong table type %d", dt->inpmaptable[pos])); in kdtMapInFixed()
1266 *outfallbackval = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 | in kdtMapInFixed()
1267 dt->inpmaptable[pos]; in kdtMapInFixed()
1273 if (inval == dt->inpmaptable[pos]) { in kdtMapInFixed()
1283 if (inval == (((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 | in kdtMapInFixed()
1284 dt->inpmaptable[pos])) { in kdtMapInFixed()
1302 static picoos_uint8 kdtMapInGraph(const kdt_subobj_t *dt, in kdtMapInGraph() argument
1321 if ((imtnr >= dt->inpmaptable[pos++]) || /* outside tablenr range? */ in kdtMapInGraph()
1327 dt->inpmaptable[pos-1], imtnr, invalmaxlen, ilen)); in kdtMapInGraph()
1333 lentable = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 | in kdtMapInGraph()
1334 dt->inpmaptable[pos]; in kdtMapInGraph()
1339 lentable = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 | in kdtMapInGraph()
1340 dt->inpmaptable[pos]; in kdtMapInGraph()
1350 dt->inpmaptable[id], dt->inpmaptable[id])); in kdtMapInGraph()
1356 if (dt->inpmaptable[pos] != PICOKDT_MTTYPE_GRAPH) { in kdtMapInGraph()
1365 *outfallbackval = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 | in kdtMapInGraph()
1366 dt->inpmaptable[pos]; in kdtMapInGraph()
1371 tlen = picobase_det_utf8_length(dt->inpmaptable[pos]); in kdtMapInGraph()
1380 if (dt->inpmaptable[pos + j] != inval[j]) { in kdtMapInGraph()
1400 static picoos_uint8 kdtMapOutFixed(const kdt_subobj_t *dt, in kdtMapOutFixed() argument
1411 nr = dt->outmaptable[PICOKDT_MTPOS_START + PICOKDT_MTPOS_TABLETYPE]; in kdtMapOutFixed()
1430 nr = ((picoos_uint16)(dt->outmaptable[PICOKDT_MTPOS_START + in kdtMapOutFixed()
1432 | dt->outmaptable[PICOKDT_MTPOS_START + PICOKDT_MTPOS_NUMBER]; in kdtMapOutFixed()
1436 *outval = dt->outmaptable[PICOKDT_MTPOS_START + in kdtMapOutFixed()
1439 *outval = ((picoos_uint16)(dt->outmaptable[PICOKDT_MTPOS_START + in kdtMapOutFixed()
1441 | dt->outmaptable[PICOKDT_MTPOS_START + in kdtMapOutFixed()
1455 static picoos_uint8 kdtReverseMapOutFixed(const kdt_subobj_t *dt, in kdtReverseMapOutFixed() argument
1472 if (dt->outmaptable == NULL) { in kdtReverseMapOutFixed()
1480 if (dt->outmaptable[pos++] != 1) { /* only one omt possible */ in kdtReverseMapOutFixed()
1481 PICODBG_ERROR(("check failed: nrtab: %d", dt->outmaptable[pos-1])); in kdtReverseMapOutFixed()
1486 lentable = ((picoos_uint16)(dt->outmaptable[pos+1])) << 8 | in kdtReverseMapOutFixed()
1487 dt->outmaptable[pos]; in kdtReverseMapOutFixed()
1496 if (dt->outmaptable[pos] == PICOKDT_MTTYPE_BYTE) { in kdtReverseMapOutFixed()
1498 } else if (dt->outmaptable[pos] == PICOKDT_MTTYPE_WORD) { in kdtReverseMapOutFixed()
1502 PICODBG_ERROR(("wrong table type %d", dt->outmaptable[pos])); in kdtReverseMapOutFixed()
1508 *outfallbackval = ((picoos_uint16)(dt->outmaptable[pos+1])) << 8 | in kdtReverseMapOutFixed()
1509 dt->outmaptable[pos]; in kdtReverseMapOutFixed()
1515 if (inval == dt->outmaptable[pos]) { in kdtReverseMapOutFixed()
1525 if (inval == (((picoos_uint16)(dt->outmaptable[pos+1])) << 8 | in kdtReverseMapOutFixed()
1526 dt->outmaptable[pos])) { in kdtReverseMapOutFixed()
1550 kdt_subobj_t * dt = &(dtposd->dt); in picokdt_dtPosDreverseMapOutFixed() local
1551 return kdtReverseMapOutFixed(dt,inval, outval, outfallbackval); in picokdt_dtPosDreverseMapOutFixed()
1556 static picoos_uint8 kdtMapOutVar(const kdt_subobj_t *dt, in kdtMapOutVar() argument
1569 if (dt->outmaptable == NULL) { in kdtMapOutVar()
1580 lentable = (((picoos_uint16)(dt->outmaptable[pos + 1])) << 8 | in kdtMapOutVar()
1581 dt->outmaptable[pos]); in kdtMapOutVar()
1585 if (dt->outmaptable[pos] != PICOKDT_MTTYPE_BYTETOVAR) { in kdtMapOutVar()
1587 PICODBG_ERROR(("wrong table type %d", dt->outmaptable[pos])); in kdtMapOutVar()
1594 nrinbytes = (((picoos_uint16)(dt->outmaptable[pos+1])) << 8 | in kdtMapOutVar()
1595 dt->outmaptable[pos]); in kdtMapOutVar()
1618 offset1 = (((picoos_uint16)(dt->outmaptable[off2ind - 1])) << 8 | in kdtMapOutVar()
1619 dt->outmaptable[off2ind - 2]); in kdtMapOutVar()
1621 *nr = (((picoos_uint16)(dt->outmaptable[off2ind + 1])) << 8 | in kdtMapOutVar()
1622 dt->outmaptable[off2ind]) - offset1; in kdtMapOutVar()
1643 outval[i] = dt->outmaptable[pos++]; in kdtMapOutVar()
1744 if (!kdtMapInGraph(&(dtposp->dt), invecpos, in picokdt_dtPosPconstructInVec()
1780 if (!kdtMapInGraph(&(dtposp->dt), invecpos, in picokdt_dtPosPconstructInVec()
1801 if (!kdtMapInGraph(&(dtposp->dt), i, chbuf[chbrear], in picokdt_dtPosPconstructInVec()
1812 if (!kdtMapInGraph(&(dtposp->dt), i, in picokdt_dtPosPconstructInVec()
1827 if (!kdtMapInFixed(&(dtposp->dt), KDT_POSP_SPECGRAPHATTPOS, i, in picokdt_dtPosPconstructInVec()
1838 if (!kdtMapInFixed(&(dtposp->dt), KDT_POSP_NRGRAPHSATTPOS, nrutfg, in picokdt_dtPosPconstructInVec()
1866 kdt_subobj_t *dt; in picokdt_dtPosPclassify() local
1869 dt = &(dtposp->dt); in picokdt_dtPosPclassify()
1872 while ((rv = kdtAskTree(dt, dtposp->invec, PICOKDT_NRATT_POSP, in picokdt_dtPosPclassify()
1876 PICODBG_DEBUG(("done: %d", dt->dclass)); in picokdt_dtPosPclassify()
1877 return ((rv == 0) && dt->dset); in picokdt_dtPosPclassify()
1888 if (dtposp->dt.dset && in picokdt_dtPosPdecomposeOutClass()
1889 kdtMapOutFixed(&(dtposp->dt), dtposp->dt.dclass, &val)) { in picokdt_dtPosPdecomposeOutClass()
1922 if (!kdtMapInFixed(&(dtposd->dt), i, input[i], in picokdt_dtPosDconstructInVec()
1949 kdt_subobj_t *dt; in picokdt_dtPosDclassify() local
1952 dt = &(dtposd->dt); in picokdt_dtPosDclassify()
1955 while ((rv = kdtAskTree(dt, dtposd->invec, PICOKDT_NRATT_POSD, in picokdt_dtPosDclassify()
1959 PICODBG_DEBUG(("done: %d", dt->dclass)); in picokdt_dtPosDclassify()
1960 if ((rv == 0) && dt->dset) { in picokdt_dtPosDclassify()
1961 *treeout = dt->dclass; in picokdt_dtPosDclassify()
1980 if (dtposd->dt.dset && in picokdt_dtPosDdecomposeOutClass()
1981 kdtMapOutFixed(&(dtposd->dt), dtposd->dt.dclass, &val)) { in picokdt_dtPosDdecomposeOutClass()
2112 if (!kdtMapInGraph(&(dtg2p->dt), iAttr, in picokdt_dtG2PconstructInVec()
2149 if (!kdtMapInGraph(&(dtg2p->dt), iAttr, in picokdt_dtG2PconstructInVec()
2198 if (!kdtMapInFixed(&(dtg2p->dt), iAttr, inval, in picokdt_dtG2PconstructInVec()
2231 kdt_subobj_t *dt; in picokdt_dtG2Pclassify() local
2234 dt = &(dtg2p->dt); in picokdt_dtG2Pclassify()
2237 while ((rv = kdtAskTree(dt, dtg2p->invec, PICOKDT_NRATT_G2P, in picokdt_dtG2Pclassify()
2241 PICODBG_TRACE(("done: %d", dt->dclass)); in picokdt_dtG2Pclassify()
2242 if ((rv == 0) && dt->dset) { in picokdt_dtG2Pclassify()
2243 *treeout = dt->dclass; in picokdt_dtG2Pclassify()
2258 if (dtg2p->dt.dset && in picokdt_dtG2PdecomposeOutClass()
2259 kdtMapOutVar(&(dtg2p->dt), dtg2p->dt.dclass, &(dtvres->nr), in picokdt_dtG2PdecomposeOutClass()
2312 if (!kdtMapInFixed(&(dtphr->dt), i, inval, in picokdt_dtPHRconstructInVec()
2337 kdt_subobj_t *dt; in picokdt_dtPHRclassify() local
2340 dt = &(dtphr->dt); in picokdt_dtPHRclassify()
2343 while ((rv = kdtAskTree(dt, dtphr->invec, PICOKDT_NRATT_PHR, in picokdt_dtPHRclassify()
2347 PICODBG_DEBUG(("done: %d", dt->dclass)); in picokdt_dtPHRclassify()
2348 return ((rv == 0) && dt->dset); in picokdt_dtPHRclassify()
2359 if (dtphr->dt.dset && in picokdt_dtPHRdecomposeOutClass()
2360 kdtMapOutFixed(&(dtphr->dt), dtphr->dt.dclass, &val)) { in picokdt_dtPHRdecomposeOutClass()
2415 if (!kdtMapInFixed(&(dtpam->dt), i, vec[i], in picokdt_dtPAMconstructInVec()
2467 kdt_subobj_t *dt; in picokdt_dtPAMclassify() local
2470 dt = &(dtpam->dt); in picokdt_dtPAMclassify()
2473 while ((rv = kdtAskTree(dt, dtpam->invec, PICOKDT_NRATT_PAM, in picokdt_dtPAMclassify()
2477 PICODBG_DEBUG(("done: %d", dt->dclass)); in picokdt_dtPAMclassify()
2478 return ((rv == 0) && dt->dset); in picokdt_dtPAMclassify()
2489 if (dtpam->dt.dset && in picokdt_dtPAMdecomposeOutClass()
2490 kdtMapOutFixed(&(dtpam->dt), dtpam->dt.dclass, &val)) { in picokdt_dtPAMdecomposeOutClass()
2559 if (!kdtReverseMapOutFixed(&(dtacc->dt), PICODATA_ACC0, in picokdt_dtACCconstructInVec()
2571 if (!kdtMapInFixed(&(dtacc->dt), i, inval, in picokdt_dtACCconstructInVec()
2599 kdt_subobj_t *dt; in picokdt_dtACCclassify() local
2602 dt = &(dtacc->dt); in picokdt_dtACCclassify()
2605 while ((rv = kdtAskTree(dt, dtacc->invec, PICOKDT_NRATT_ACC, in picokdt_dtACCclassify()
2609 PICODBG_TRACE(("done: %d", dt->dclass)); in picokdt_dtACCclassify()
2610 if ((rv == 0) && dt->dset) { in picokdt_dtACCclassify()
2611 *treeout = dt->dclass; in picokdt_dtACCclassify()
2626 if (dtacc->dt.dset && in picokdt_dtACCdecomposeOutClass()
2627 kdtMapOutFixed(&(dtacc->dt), dtacc->dt.dclass, &val)) { in picokdt_dtACCdecomposeOutClass()