예제 #1
0
  void device_t<COI>::free(){
    OCCA_EXTRACT_DATA(COI, Device);

    OCCA_COI_CHECK("Device: Freeing Chief Processes",
                   COIProcessDestroy(data_.chiefID,
                                     -1,
                                     false,
                                     NULL,
                                     NULL));

    delete data;
  }
예제 #2
0
  void cleanup()
  {
    /* run cleanup runfunction */
    COIRESULT result = COIPipelineRunFunction (pipeline, runCleanup, 0, NULL, NULL, 0, NULL, NULL, 0, NULL, 0, NULL);

    if (result != COI_SUCCESS) 
      throw std::runtime_error("Error launching runfunction: "+std::string(COIResultGetName(result)));

    /* destroy Xeon Phi process */
    result = COIProcessDestroy(process,-1,0,NULL,NULL);
    if (result != COI_SUCCESS) 
      throw std::runtime_error(std::string("Destroying COI process failed: ") + std::string(COIResultGetName(result)));
  }