[Mesa-dev] [PATCH 09/11] clover: Add constructors to some of the module classes v2
Tom Stellard
tstellar at gmail.com
Tue May 22 10:25:20 PDT 2012
This is for the llvm code that can't use extended initializers.
v2:
- Use const references for vector arguments
- Move constructor defs before data members
- Initialize all values in the default constructors
---
src/gallium/state_trackers/clover/core/module.hpp | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/gallium/state_trackers/clover/core/module.hpp b/src/gallium/state_trackers/clover/core/module.hpp
index bc4b203..6361898 100644
--- a/src/gallium/state_trackers/clover/core/module.hpp
+++ b/src/gallium/state_trackers/clover/core/module.hpp
@@ -44,6 +44,11 @@ namespace clover {
data_private
};
+ section(resource_id id, enum type type, size_t size,
+ const clover::compat::vector<char> &data) :
+ id(id), type(type), size(size), data(data) { }
+ section() : id(0), type(type), size(0), data() { }
+
resource_id id;
type type;
size_t size;
@@ -63,11 +68,19 @@ namespace clover {
sampler
};
+ argument(enum type type, size_t size) : type(type), size(size) { }
+ argument() : type(scalar), size(0) { }
+
type type;
size_t size;
};
struct symbol {
+ symbol(const clover::compat::vector<char> &name, resource_id section,
+ size_t offset, const clover::compat::vector<argument> &args) :
+ name(name), section(section), offset(offset), args(args) { }
+ symbol() : name(), section(0), offset(0), args() { }
+
clover::compat::vector<char> name;
resource_id section;
size_t offset;
--
1.7.3.4
More information about the mesa-dev
mailing list