Example #1
0
extern void recInitialize()
{
    if( recDb::GetDb() == NULL ) {
        recDb::SetDb( new wxSQLite3Database() );
    }
    calInit();
}
Example #2
0
bool CalInitObject::checkInt()
{
    if (!mInitialized) {
        if (calInit() == CAL_RESULT_OK) {
            mInitialized = true;
            fprintf(stderr, "Initialized CAL\n");

            CALuint version[3];
            calGetVersion(&version[0], &version[1], &version[2]);
            fprintf(stderr, "CAL Runtime version %d.%d.%d\n", version[0],
                    version[1], version[2]);

        }
    }
    return mInitialized;
}
/* Init CAL, check device capabilities, and prepare new kernel from workunit parameters */
CALresult separationCALInit(MWCALInfo* ci, const CLRequest* clr)
{
    CALresult err;

    err = calInit();
    if (err != CAL_RESULT_OK)
    {
        cal_warn("Failed to init CAL", err);
        return err;
    }

    err = calExtSupported(0x8009);
    if (err != CAL_RESULT_OK)
    {
        cal_warn("calCtxWaitForEvents not supported\n", err);
        return err;
    }

    err = calExtGetProc((CALextproc*) &mw_calCtxWaitForEvents, 0x8009, "calCtxWaitForEvents");
    if (err != CAL_RESULT_OK)
    {
        cal_warn("Error getting calCtxWaitForEvents", err);
        return err;
    }

    err = mwGetCALInfo(ci, clr->devNum);
    if (err != CAL_RESULT_OK)
    {
        cal_warn("Failed to get CAL info", err);
        calShutdown();
        return err;
    }

    printCALInfo(ci);

    if (!checkDeviceCapabilities(&ci->devAttribs))
    {
        warn("Device failed capability check\n");
        mwCALShutdown(ci);
        return CAL_RESULT_ERROR;
    }

    return CAL_RESULT_OK;
}
Example #4
0
void CalTestCase::setUp()
{
    calInit();
}