[arrayfire] 06/41: TYPO Correction to comments after fixes from commit 0258883
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Mar 21 14:56:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.
commit 980b8fcc0cf03513c0d0b715011954e31741f4e7
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Fri Mar 4 10:14:17 2016 -0500
TYPO Correction to comments after fixes from commit 0258883
---
src/backend/ArrayInfo.cpp | 4 ++--
src/backend/ArrayInfo.hpp | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/backend/ArrayInfo.cpp b/src/backend/ArrayInfo.cpp
index 0937641..98a2264 100644
--- a/src/backend/ArrayInfo.cpp
+++ b/src/backend/ArrayInfo.cpp
@@ -33,7 +33,7 @@ dim4 calcStrides(const dim4 &parentDim)
int ArrayInfo::getDevId() const
{
- // The actual device ID is only stored in the first 4 bits of devId
+ // The actual device ID is only stored in the first 8 bits of devId
// See ArrayInfo.hpp for more
return devId & 0xff;
}
@@ -49,7 +49,7 @@ void ArrayInfo::setId(int id) const
void ArrayInfo::setId(int id)
{
- // 1 << (backendId + 3) sets the 9th, 10th or 11th bit of devId to 1
+ // 1 << (backendId + 8) sets the 9th, 10th or 11th bit of devId to 1
// for CPU, CUDA and OpenCL respectively
// See ArrayInfo.hpp for more
int backendId = detail::getBackend() >> 1; // Convert enums 1, 2, 4 to ints 0, 1, 2
diff --git a/src/backend/ArrayInfo.hpp b/src/backend/ArrayInfo.hpp
index 88ba26b..7d3606e 100644
--- a/src/backend/ArrayInfo.hpp
+++ b/src/backend/ArrayInfo.hpp
@@ -29,14 +29,14 @@ class ArrayInfo
{
private:
// The devId variable stores information about the deviceId as well as the backend.
- // The 4 LSBs (0-3) are used to store the device ID.
- // The 4th LSB is set to 1 if backend is CPU
- // The 5th LSB is set to 1 if backend is CUDA
- // The 6th LSB is set to 1 if backend is OpenCL
+ // The 8 LSBs (0-7) are used to store the device ID.
+ // The 09th LSB is set to 1 if backend is CPU
+ // The 10th LSB is set to 1 if backend is CUDA
+ // The 11th LSB is set to 1 if backend is OpenCL
// This information can be retrieved directly from an af_array by doing
// int* devId = reinterpret_cast<int*>(a); // a is an af_array
- // af_backend backendID = *devId >> 3; // Returns 1, 2, 4 for CPU, CUDA or OpenCL respectively
- // int deviceID = *devId & 0xf; // Returns devices ID between 0-15
+ // af_backend backendID = *devId >> 8; // Returns 1, 2, 4 for CPU, CUDA or OpenCL respectively
+ // int deviceID = *devId & 0xff; // Returns devices ID between 0-255
// This is possible by doing a static_assert on devId
//
// This can be changed in the future if the need arises for more devices as this
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list