Пример #1
0
void ProgramLauncher::launch(const Program *program, std::vector<Program::Parameter> &parameters, const Domain &domain, bool blocking) {
	//std::cout << "The program " << program->getName() << std::endl; 

	size_t s[3];
    for (size_t i = 1; i <= 3; i++) {
		//std::cout << "\tis executing on domain size "<< domain.getMeshWithGC((Domain::Dim)i) << std::endl;
        if(i <= (size_t)domain.getDimensions())
			s[i-1] = roundUp(domain.getMeshWithGC((Domain::Dim)i),32);
		else
			s[i-1] = 1;
		//std::cout << "\twhich is padded to " << s[i-1] << std::endl;
    }
    launch(program, parameters, domain.getDimensions(), &s[0], blocking);
}