2022-09-24 16:07:46 +05:00
|
|
|
|
|
|
|
#include "context.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
namespace hpr::gpu
|
|
|
|
{
|
|
|
|
|
|
|
|
Context::Context() :
|
|
|
|
p_api {DeviceAPI::Unknown}
|
|
|
|
{}
|
|
|
|
|
|
|
|
Context::Context(DeviceAPI api) :
|
|
|
|
p_api {api}
|
|
|
|
{}
|
|
|
|
|
2022-11-18 21:50:49 +05:00
|
|
|
Context::~Context() = default;
|
2022-09-24 16:07:46 +05:00
|
|
|
|
|
|
|
bool Context::checkCompability(const Context* ctx) const
|
|
|
|
{
|
|
|
|
return (ctx != nullptr) ? ctx->p_api == p_api : true;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|