clover: remove compat classes that match std one
Acked-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
This commit is contained in:
parent
3c61ff0d89
commit
1b4a1d0049
|
@ -45,7 +45,6 @@ CPP_SOURCES := \
|
|||
util/adaptor.hpp \
|
||||
util/algebra.hpp \
|
||||
util/algorithm.hpp \
|
||||
util/compat.cpp \
|
||||
util/compat.hpp \
|
||||
util/factor.hpp \
|
||||
util/functional.hpp \
|
||||
|
|
|
@ -216,7 +216,7 @@ clCompileProgram(cl_program d_prog, cl_uint num_devs,
|
|||
throw error(CL_INVALID_OPERATION);
|
||||
|
||||
if (!any_of(key_equals(name), headers))
|
||||
headers.push_back(compat::pair<compat::string, compat::string>(
|
||||
headers.push_back(std::pair<compat::string, compat::string>(
|
||||
name, header.source()));
|
||||
},
|
||||
range(header_names, num_headers),
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "pipe/p_defines.h"
|
||||
|
||||
namespace clover {
|
||||
typedef compat::vector<compat::pair<compat::string,
|
||||
typedef compat::vector<std::pair<compat::string,
|
||||
compat::string> > header_map;
|
||||
|
||||
module compile_program_llvm(const compat::string &source,
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include "CL/cl.h"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include "util/compat.hpp"
|
||||
|
||||
namespace clover {
|
||||
|
@ -50,10 +52,10 @@ namespace clover {
|
|||
/// Class that represents an error that can be converted to an
|
||||
/// OpenCL status code.
|
||||
///
|
||||
class error : public compat::runtime_error {
|
||||
class error : public std::runtime_error {
|
||||
public:
|
||||
error(cl_int code, compat::string what = "") :
|
||||
compat::runtime_error(what), code(code) {
|
||||
std::runtime_error(what), code(code) {
|
||||
}
|
||||
|
||||
cl_int get() const {
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
//
|
||||
// Copyright 2013 Francisco Jerez
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#include "util/compat.hpp"
|
||||
|
||||
using namespace clover::compat;
|
||||
|
||||
exception::~exception() {
|
||||
}
|
||||
|
||||
const char *
|
||||
exception::what() const {
|
||||
return "";
|
||||
}
|
||||
|
||||
const char *
|
||||
runtime_error::what() const {
|
||||
return _what.c_str();
|
||||
}
|
|
@ -411,33 +411,6 @@ namespace clover {
|
|||
private:
|
||||
mutable vector<char> v;
|
||||
};
|
||||
|
||||
template<typename T, typename S>
|
||||
struct pair {
|
||||
pair(T first, S second) :
|
||||
first(first), second(second) {}
|
||||
|
||||
T first;
|
||||
S second;
|
||||
};
|
||||
|
||||
class exception {
|
||||
public:
|
||||
exception() {}
|
||||
virtual ~exception();
|
||||
|
||||
virtual const char *what() const;
|
||||
};
|
||||
|
||||
class runtime_error : public exception {
|
||||
public:
|
||||
runtime_error(const string &what) : _what(what) {}
|
||||
|
||||
virtual const char *what() const;
|
||||
|
||||
protected:
|
||||
string _what;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue