Пример #1
0
int main() 
{
	if (!is_gpu_hardware_available())
		return runall_skip;

    const int _rank = 5;
    int edata[_rank];
    for (int i = 0; i < _rank; i++)
        edata[i] = 3;
    extent<_rank> e1(edata);

    int passed = runall_fail;
    {
        accelerator_view gpu_av = _gpu_device.create_view(queuing_mode_immediate);
        accelerator_view cpu_av = _cpu_device.create_view(queuing_mode_immediate);

        array<int, _rank> src(e1, gpu_av, cpu_av);

        if (src.associated_accelerator_view == src.accelerator_view)
            passed = runall_pass;
    }

    printf("%s\n", (passed == runall_pass) ? "Passed!" : "Failed!"); 

    return passed;
}
Пример #2
0
runall_result test_main()
{
	SKIP_IF(!is_gpu_hardware_available());

	runall_result result;

	result &= REPORT_RESULT((test_feature<int, 1>()));
	result &= REPORT_RESULT((test_feature<unsigned int, 91>()));
	result &= REPORT_RESULT((test_feature<float, 5>()));
	result &= REPORT_RESULT((test_feature<double, 31>()));
    
    return result;
}
Пример #3
0
Файл: test.cpp Проект: 8l/kalmar
runall_result test_main()
{
	SKIP_IF(!is_gpu_hardware_available());

	runall_result result;

	result &= REPORT_RESULT((test_feature<int, 1, 1, 1>()));
	result &= REPORT_RESULT((test_feature<int, 7, 3, 2>()));
	result &= REPORT_RESULT((test_feature<int, 5, 3, 5>()));
	result &= REPORT_RESULT((test_feature<unsigned, 3, 2, 1>()));
	result &= REPORT_RESULT((test_feature<signed, 3, 5, 5>()));
	result &= REPORT_RESULT((test_feature<float, 2, 3, 2>()));
    result &= REPORT_RESULT((test_feature<float, 5, 1, 5>()));
	result &= REPORT_RESULT((test_feature<double, 2, 7, 7>()));
	
    return result;
}