コード例 #1
0
ファイル: rkeditordataframe.cpp プロジェクト: KDE/rkward
RKEditorDataFrame::RKEditorDataFrame (RContainerObject* object, QWidget *parent) : TwinTable (parent) {
	RK_TRACE (EDITOR);

	commonInit ();

	RK_ASSERT (!object->isPending ());
	RKEditor::object = object;
	RK_ASSERT (object->isDataFrame ());
	setGlobalContextProperty ("current_object", object->getFullName());

	RKVarEditDataFrameModel* model = new RKVarEditDataFrameModel (object, this);
	initTable (model, object);
	connect (model, SIGNAL (modelObjectDestroyed()), this, SLOT (detachModel()));

	waitForLoad ();
}
コード例 #2
0
  void PandaChunk::loadData(const bool async)
  {
    data = reinterpret_cast<char * >(cudacpp::Runtime::mallocHost(elemSize * numElems));
    reader = new oscpp::AsyncFileReader;
    oscpp::AsyncIORequest * openReq;
    openReq = reader->open(fileName.c_str());
    openReq->sync();
    if (openReq->hasError())
    {
      fprintf(stderr, "Error opening file '%s'.\n", fileName.c_str());
      fflush(stderr);
    }
    delete openReq;

    int soFar = 0;
    while (soFar < numElems)
    {
      int elemsToRead = std::min(numElems - soFar, maxReadSize / elemSize);
      readReqs.push_back(reader->read(data + soFar * elemSize, elemsToRead * elemSize));
      soFar += elemsToRead;
    }

    if (!async) waitForLoad();
  }
コード例 #3
0
 void PandaChunk::finishLoading()
 {
   if (loaded) return;
   if (reader == NULL) loadData(false);
   waitForLoad();
 }
コード例 #4
0
 PandaChunk::~PandaChunk()
 {
   waitForLoad();
   if (data != NULL) cudacpp::Runtime::freeHost(data);
 }//PandaChunk
コード例 #5
0
 CleanlyLoadingComponent(QQmlEngine *engine, const QString &fileName)
     : QQmlComponent(engine, fileName, QQmlComponent::Asynchronous)
 { waitForLoad(); }
コード例 #6
0
 CleanlyLoadingComponent(QQmlEngine *engine, const QUrl &url)
     : QQmlComponent(engine, url, QQmlComponent::Asynchronous)
 { waitForLoad(); }
コード例 #7
0
ファイル: FixedSizeChunk.cpp プロジェクト: maritzalapa/gpmr
FixedSizeChunk::~FixedSizeChunk()
{
    waitForLoad();
    if (data != NULL) cudacpp::Runtime::freeHost(data);
}