diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-10-14 11:43:57 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-10-14 11:43:57 +0200 |
commit | 54d0c440ce84d61db1b462033052dd0f532a40d8 (patch) | |
tree | b117bb9044a2f6b56428af2fc8e73c27c106ba15 /src/cupp11.hpp | |
parent | 16b9efd60528ea9230810e6cb6287fe780f02527 (diff) |
Various fixes to make the host code and sample compile with the CUDA API
Diffstat (limited to 'src/cupp11.hpp')
-rw-r--r-- | src/cupp11.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cupp11.hpp b/src/cupp11.hpp index 988366ea..854c0be9 100644 --- a/src/cupp11.hpp +++ b/src/cupp11.hpp @@ -370,6 +370,8 @@ using ContextPointer = CUcontext*; // C++11 version of 'nvrtcProgram'. Additionally holds the program's source code. class Program { public: + Program() = default; + // Note that there is no constructor based on the regular CUDA data-type because of extra state // Source-based constructor with memory management @@ -404,7 +406,7 @@ public: // Confirms whether a certain status code is an actual compilation error or warning bool StatusIsCompilationWarningOrError(const nvrtcResult status) const { - return (status == NVRTC_ERROR_INVALID_INPUT); + return (status == NVRTC_ERROR_COMPILATION); } // Retrieves the warning/error message from the compiler (if any) @@ -433,8 +435,8 @@ public: const nvrtcProgram& operator()() const { return *program_; } private: std::shared_ptr<nvrtcProgram> program_; - const std::string source_; - const bool from_binary_; + std::string source_; + bool from_binary_; }; // ================================================================================================= @@ -730,7 +732,7 @@ public: // TODO: Implement this function void Launch(const Queue &queue, const std::vector<size_t> &global, const std::vector<size_t> &local, EventPointer event, - std::vector<Event>& waitForEvents) { + const std::vector<Event>& waitForEvents) { if (local.size() == 0) { throw LogicError("Kernel: launching with a default workgroup size is not implemented for the CUDA back-end"); } |