Skip to content

Commit

Permalink
Fix in CUDA back-end
Browse files Browse the repository at this point in the history
  • Loading branch information
CNugteren committed Oct 8, 2017
1 parent 4087fc6 commit 5556174
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Version 9.0 (2017-10-07):
Version 9.0 (2017-10-08):
- Synchronized with the CLBLast's clpp11.h header
- Added custom exception class hierarchy for catching errors
- Removal of custom error codes for program building in favor of throwing exceptions
Expand Down
6 changes: 4 additions & 2 deletions include/cupp11.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class Platform {
public:

// Initializes the platform. Note that the platform ID variable is not actually used for CUDA.
explicit Platform(const size_t platform_id) {
explicit Platform(const size_t platform_id) : platform_id_(0) {
if (platform_id != 0) { throw LogicError("CUDA back-end requires a platform ID of 0"); }
CheckError(cuInit(0));
}
Expand All @@ -197,7 +197,9 @@ class Platform {
}

// Accessor to the raw ID (which doesn't exist in the CUDA back-end, this is always just 0)
const RawPlatformID& operator()() const { return 0; }
const RawPlatformID& operator()() const { return platform_id_; }
private:
const size_t platform_id_;
};

// Retrieves a vector with all platforms. Note that there is just one platform in CUDA.
Expand Down

0 comments on commit 5556174

Please sign in to comment.