summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorEdB <[email protected]>2015-04-24 12:59:54 +0200
committerTom Stellard <[email protected]>2015-04-29 12:44:53 +0000
commit1b4a1d0049646e574565bab38b8ae935c1c45fae (patch)
treeab089ca4170b52b5def37b70935fa7d2605dc633 /src/gallium/state_trackers
parent3c61ff0d89da4a8cc921d131ce0c2480ddb111a0 (diff)
clover: remove compat classes that match std one
Acked-by: Francisco Jerez <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/clover/Makefile.sources1
-rw-r--r--src/gallium/state_trackers/clover/api/program.cpp2
-rw-r--r--src/gallium/state_trackers/clover/core/compiler.hpp2
-rw-r--r--src/gallium/state_trackers/clover/core/error.hpp6
-rw-r--r--src/gallium/state_trackers/clover/util/compat.cpp38
-rw-r--r--src/gallium/state_trackers/clover/util/compat.hpp27
6 files changed, 6 insertions, 70 deletions
diff --git a/src/gallium/state_trackers/clover/Makefile.sources b/src/gallium/state_trackers/clover/Makefile.sources
index 5b3344c63ff..03eb754e903 100644
--- a/src/gallium/state_trackers/clover/Makefile.sources
+++ b/src/gallium/state_trackers/clover/Makefile.sources
@@ -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 \
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp
index 60184ed10b8..c9856901c2e 100644
--- a/src/gallium/state_trackers/clover/api/program.cpp
+++ b/src/gallium/state_trackers/clover/api/program.cpp
@@ -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),
diff --git a/src/gallium/state_trackers/clover/core/compiler.hpp b/src/gallium/state_trackers/clover/core/compiler.hpp
index 7210d1e9cdc..bec8aacf65d 100644
--- a/src/gallium/state_trackers/clover/core/compiler.hpp
+++ b/src/gallium/state_trackers/clover/core/compiler.hpp
@@ -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,
diff --git a/src/gallium/state_trackers/clover/core/error.hpp b/src/gallium/state_trackers/clover/core/error.hpp
index 7b010f1b1dd..45a38c1165b 100644
--- a/src/gallium/state_trackers/clover/core/error.hpp
+++ b/src/gallium/state_trackers/clover/core/error.hpp
@@ -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 {
diff --git a/src/gallium/state_trackers/clover/util/compat.cpp b/src/gallium/state_trackers/clover/util/compat.cpp
deleted file mode 100644
index 80d5b3ecf82..00000000000
--- a/src/gallium/state_trackers/clover/util/compat.cpp
+++ /dev/null
@@ -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();
-}
diff --git a/src/gallium/state_trackers/clover/util/compat.hpp b/src/gallium/state_trackers/clover/util/compat.hpp
index 735994f50a6..ea7d3a000be 100644
--- a/src/gallium/state_trackers/clover/util/compat.hpp
+++ b/src/gallium/state_trackers/clover/util/compat.hpp
@@ -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;
- };
}
}