Changeset 1742 in Sophya


Ignore:
Timestamp:
Nov 10, 2001, 12:13:15 AM (24 years ago)
Author:
aubourg
Message:

optim lecture/ecriture en bloc

Location:
trunk/ArchTOIPipe/Kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/toi.cc

    r1740 r1742  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toi.cc,v 1.8 2001-11-08 23:23:58 aubourg Exp $
     5// $Id: toi.cc,v 1.9 2001-11-09 23:13:14 aubourg Exp $
    66
    77#include "toiprocessor.h"
     
    117117*/
    118118
    119 double TOI::getData(int i) {
     119double TOI::getData(int i) { /* deprecated, overriden in toisegment */
    120120  lock();
    121121  uint_8 flg;
     
    127127}
    128128
    129 void TOI::getData(int i, double &data, uint_8 &flag) {
     129void TOI::getData(int i, double &data, uint_8 &flag) { /* deprecated, overriden in toisegment */
    130130  lock();
    131131  doGetData(i, data, flag);
     
    135135}
    136136
    137  
    138 
    139 void TOI::putData(int i, double value, uint_8 flag) {
     137void TOI::getData(int i, int n, double* data, uint_8* flg) {
     138  cerr << "TOI::getData [double*] unimplemented" << endl;
     139  exit(-1);
     140}
     141
     142void TOI::putData(int i, int n, double const* var, uint_8 const* flg) {
     143  cerr << "TOI::putData [double*] unimplemented" << endl;
     144  exit(-1);
     145}
     146
     147void TOI::putData(int i, double value, uint_8 flag) { /* deprecated, overriden in toisegment */
    140148  lock();
    141149  doPutData(i, value, flag);
     
    144152}
    145153
    146 void TOI::waitForData(int iStart, int iEnd) {
     154void TOI::waitForData(int iStart, int iEnd) { /* deprecated, overriden in toisegment */
    147155  if (producer == NULL) throw NotFoundExc("TOI has no producer !");
    148156   
     
    163171}
    164172
    165 void TOI::waitForData(int i) {
     173void TOI::waitForData(int i) { /* deprecated, overriden in toisegment */
    166174  waitForData(i,i);
    167175}
    168176
    169 void TOI::waitForAnyData() {
     177void TOI::waitForAnyData() { /* deprecated, overriden in toisegment */
    170178  if (! hasSomeData()) {
    171179    producer->lock();
     
    193201}
    194202
    195 void TOI::wontNeedBefore(int i) {
     203void TOI::wontNeedBefore(int i) { /* deprecated, overriden in toisegment */
    196204  int j=i;
    197205  for (vector<TOIProcessor*>::iterator k = consumers.begin();
  • trunk/ArchTOIPipe/Kernel/toi.h

    r1740 r1742  
    55//                               Christophe Magneville
    66//                               Reza Ansari
    7 // $Id: toi.h,v 1.10 2001-11-08 23:23:58 aubourg Exp $
     7// $Id: toi.h,v 1.11 2001-11-09 23:13:15 aubourg Exp $
    88
    99#ifndef TOI_H
     
    5252  virtual void          getData(int i, double &data, uint_8 &flag);
    5353  //RZCMV  virtual DataStatus    getDataError(int i,double &data,double &error,int_4 &flag);
     54  virtual void          getData(int i, int n, double* data, uint_8* flg=0);
    5455
    5556  virtual DataStatus    isDataAvail(int iStart, int iEnd);
     
    6465  //RZCMV  virtual void          putDataError(int i, double value,
    6566  //                                 double error, int_4 flag=0);
     67  virtual void          putData(int i, int n, double const* val, uint_8 const* flg);
    6668  virtual void          putDone() {}
    6769
  • trunk/ArchTOIPipe/Kernel/toiprocessor.cc

    r1740 r1742  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toiprocessor.cc,v 1.14 2001-11-08 23:23:58 aubourg Exp $
     5// $Id: toiprocessor.cc,v 1.15 2001-11-09 23:13:15 aubourg Exp $
    66
    77#include "toiprocessor.h"
     
    321321  if (toi->needSyncOldWay()) toi->waitForData(i); // seulement pour autre que segmented
    322322  toi->getData(i, data, flag);
     323  autoWontNeed(i);
    323324  return;
    324325}
     326
     327void TOIProcessor::getData(int toiIndex, int i, int n, double* d)
     328{
     329  TOI* toi = getInputTOI(toiIndex);
     330  if (toi->needSyncOldWay()) toi->waitForData(i+n); // seulement pour autre que segmented
     331  toi->getData(i, n, d);
     332  autoWontNeed(i);
     333  return;
     334}
     335
     336void TOIProcessor::getData(int toiIndex, int i, int n, double* d, uint_8* f)
     337{
     338  TOI* toi = getInputTOI(toiIndex);
     339  if (toi->needSyncOldWay()) toi->waitForData(i+n); // seulement pour autre que segmented
     340  toi->getData(i, n, d, f);
     341  autoWontNeed(i);
     342  return;
     343}
     344
    325345
    326346/*RZCMV
     
    369389  TOI* toi = getOutputTOI(toiIndex);
    370390  toi->putData(i, value, flg);
    371   autoWontNeed(i);
     391  // autoWontNeed(i);  // now done on getData
     392  if (toi->needSyncOldWay())  notify(); // seulement pour non segmented
     393}
     394
     395void TOIProcessor::putData(int toiIndex, int i, int n, double const* val,
     396                           uint_8 const* flg=0) {
     397  TOI* toi = getOutputTOI(toiIndex);
     398  toi->putData(i, n, val, flg);
    372399  if (toi->needSyncOldWay())  notify(); // seulement pour non segmented
    373400}
Note: See TracChangeset for help on using the changeset viewer.