Skip to content

Commit 5556174

Browse files
committed
Fix in CUDA back-end
1 parent 4087fc6 commit 5556174

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Version 9.0 (2017-10-07):
2+
Version 9.0 (2017-10-08):
33
- Synchronized with the CLBLast's clpp11.h header
44
- Added custom exception class hierarchy for catching errors
55
- Removal of custom error codes for program building in favor of throwing exceptions

include/cupp11.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class Platform {
175175
public:
176176

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

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

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

0 commit comments

Comments
 (0)