Files
triton/lib/backend/keywords.cpp
Philippe Tillet cf5028d55b Squashed feature branch:
* Added CUDA support
 * Performance improvements
 * API improvements
 * Added "depth" parameter to GEMM
 * Android cross-compilation
2015-04-29 15:52:21 -04:00

30 lines
513 B
C++

#include "isaac/backend/keywords.h"
namespace isaac
{
keyword::keyword(driver::backend_type backend, std::string const & opencl, std::string const & cuda) : backend_(backend), opencl_(opencl), cuda_(cuda)
{
}
std::string const & keyword::get() const
{
switch(backend_)
{
case driver::OPENCL: return opencl_;
#ifdef ISAAC_WITH_CUDA
case driver::CUDA: return cuda_;
#endif
default: throw;
}
}
std::ostream & operator<<(std::ostream & ss, keyword const & kw)
{
return ss << kw.get();
}
}