Models: added basic database structure

This commit is contained in:
Philippe Tillet
2015-08-05 17:01:42 -07:00
parent ebab87af61
commit df9f6142ef
12 changed files with 639 additions and 199 deletions

View File

@@ -20,7 +20,7 @@ private:
friend class CommandQueue;
public:
enum ISAACAPI VENDOR
enum class ISAACAPI VENDOR
{
AMD,
INTEL,
@@ -28,6 +28,13 @@ public:
UNKNOWN
};
enum class ISAACAPI ARCHITECTURE
{
HASWELL,
BROADWELL,
UNKNOWN
};
private:
#ifdef ISAAC_WITH_CUDA
template<CUdevice_attribute attr>
@@ -42,13 +49,15 @@ public:
bool operator==(Device const &) const;
bool operator<(Device const &) const;
VENDOR vendor() const;
ARCHITECTURE architecture() const;
backend_type backend() const;
size_t clock_rate() const;
unsigned int address_bits() const;
driver::Platform platform() const;
std::string name() const;
std::string vendor_str() const;
VENDOR vendor() const;
std::vector<size_t> max_work_item_sizes() const;
device_type type() const;
std::string extensions() const;

View File

@@ -50,6 +50,7 @@ namespace isaac
static void set(driver::CommandQueue const & queue, expression_type operation, numeric_type dtype, std::shared_ptr<model> const & model);
private:
static std::map<driver::CommandQueue, map_type> data_;
static const std::map<std::pair<driver::Device::VENDOR, driver::Device::ARCHITECTURE> , const char *> database_;
};
extern std::map<std::pair<expression_type, numeric_type>, std::shared_ptr<templates::base> > fallbacks;