diff options
author | CNugteren <web@cedricnugteren.nl> | 2015-07-19 13:44:37 +0200 |
---|---|---|
committer | CNugteren <web@cedricnugteren.nl> | 2015-07-19 13:44:37 +0200 |
commit | 4e499a67c1eb9f7cc4a79e75046aa0315b5df87d (patch) | |
tree | 7d24d5069cf6145ce73a621d254bf17da7752ace /src/routine.cc | |
parent | 250f8ab2953fd6730ce97c2e5ab464d22efb639c (diff) |
The kernel source string is now a routine's member variable
Diffstat (limited to 'src/routine.cc')
-rw-r--r-- | src/routine.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/routine.cc b/src/routine.cc index 27bfa8f9..eb5c5034 100644 --- a/src/routine.cc +++ b/src/routine.cc @@ -22,9 +22,10 @@ namespace clblast { std::vector<Routine::ProgramCache> Routine::program_cache_; // Constructor: not much here, because no status codes can be returned -Routine::Routine(CommandQueue &queue, Event &event, +Routine::Routine(CommandQueue &queue, Event &event, const std::string &name, const std::vector<std::string> &routines, const Precision precision): precision_(precision), + routine_name_(name), queue_(queue), event_(event), context_(queue_.GetContext()), @@ -40,7 +41,7 @@ Routine::Routine(CommandQueue &queue, Event &event, // ================================================================================================= // Separate set-up function to allow for status codes to be returned -StatusCode Routine::SetUp(const std::string &routine_source) { +StatusCode Routine::SetUp() { // Queries the cache to see whether or not the compiled kernel is already there. If not, it will // be built and added to the cache. @@ -63,7 +64,8 @@ StatusCode Routine::SetUp(const std::string &routine_source) { // Loads the common header (typedefs and defines and such) std::string common_header = - #include "kernels/common.opencl" + #include "kernels/common.opencl" + ; // Collects the parameters for this device in the form of defines, and adds the precision auto defines = db_.GetDefines(); @@ -76,7 +78,7 @@ StatusCode Routine::SetUp(const std::string &routine_source) { } // Combines everything together into a single source string - auto source_string = defines + common_header + routine_source; + auto source_string = defines + common_header + source_string_; // Compiles the kernel try { |