[arrayfire] 55/75: Renaming ambiguous getInfo to getDeviceInfo
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:01:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.
commit 571f0caed833a5fc1e2ff2629f47bd15b273c86c
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date: Tue Feb 23 17:00:45 2016 -0500
Renaming ambiguous getInfo to getDeviceInfo
---
src/api/c/device.cpp | 6 +++---
src/backend/cpu/platform.cpp | 2 +-
src/backend/cpu/platform.hpp | 2 +-
src/backend/cuda/platform.cpp | 24 ++++++++++++------------
src/backend/cuda/platform.hpp | 7 ++-----
src/backend/opencl/platform.cpp | 2 +-
src/backend/opencl/platform.hpp | 4 ++--
7 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/src/api/c/device.cpp b/src/api/c/device.cpp
index 937b0a6..6c089f5 100644
--- a/src/api/c/device.cpp
+++ b/src/api/c/device.cpp
@@ -65,7 +65,7 @@ af_err af_init()
try {
static bool first = true;
if(first) {
- getInfo();
+ getDeviceInfo();
first = false;
}
} CATCHALL;
@@ -75,7 +75,7 @@ af_err af_init()
af_err af_info()
{
try {
- printf("%s", getInfo().c_str());
+ printf("%s", getDeviceInfo().c_str());
} CATCHALL;
return AF_SUCCESS;
}
@@ -83,7 +83,7 @@ af_err af_info()
af_err af_info_string(char **str, const bool verbose)
{
try {
- std::string infoStr = getInfo();
+ std::string infoStr = getDeviceInfo();
af_alloc_host((void**)str, sizeof(char) * (infoStr.size() + 1));
// Need to do a deep copy
diff --git a/src/backend/cpu/platform.cpp b/src/backend/cpu/platform.cpp
index 7e6bc81..9474c79 100644
--- a/src/backend/cpu/platform.cpp
+++ b/src/backend/cpu/platform.cpp
@@ -224,7 +224,7 @@ static inline std::string <rim(std::string &s)
return s;
}
-std::string getInfo()
+std::string getDeviceInfo()
{
std::ostringstream info;
static CPUInfo cinfo;
diff --git a/src/backend/cpu/platform.hpp b/src/backend/cpu/platform.hpp
index 82ed42c..7caddcc 100644
--- a/src/backend/cpu/platform.hpp
+++ b/src/backend/cpu/platform.hpp
@@ -16,7 +16,7 @@ namespace cpu {
int getBackend();
- std::string getInfo();
+ std::string getDeviceInfo();
bool isDoubleSupported(int device);
diff --git a/src/backend/cuda/platform.cpp b/src/backend/cuda/platform.cpp
index 67f3f08..10cfdc8 100644
--- a/src/backend/cuda/platform.cpp
+++ b/src/backend/cuda/platform.cpp
@@ -150,18 +150,6 @@ int getBackend()
return AF_BACKEND_CUDA;
}
-string getInfo()
-{
- ostringstream info;
- info << "ArrayFire v" << AF_VERSION
- << " (CUDA, " << get_system() << ", build " << AF_REVISION << ")" << std::endl;
- info << getPlatformInfo();
- for (int i = 0; i < getDeviceCount(); ++i) {
- info << getDeviceInfo(i);
- }
- return info.str();
-}
-
string getDeviceInfo(int device)
{
cudaDeviceProp dev = getDeviceProp(device);
@@ -186,6 +174,18 @@ string getDeviceInfo(int device)
return info;
}
+string getDeviceInfo()
+{
+ ostringstream info;
+ info << "ArrayFire v" << AF_VERSION
+ << " (CUDA, " << get_system() << ", build " << AF_REVISION << ")" << std::endl;
+ info << getPlatformInfo();
+ for (int i = 0; i < getDeviceCount(); ++i) {
+ info << getDeviceInfo(i);
+ }
+ return info.str();
+}
+
string getPlatformInfo()
{
string driverVersion = getDriverVersion();
diff --git a/src/backend/cuda/platform.hpp b/src/backend/cuda/platform.hpp
index 6b4186b..3fcc67e 100644
--- a/src/backend/cuda/platform.hpp
+++ b/src/backend/cuda/platform.hpp
@@ -22,8 +22,7 @@ namespace cuda
int getBackend();
-std::string getInfo();
-
+std::string getDeviceInfo();
std::string getDeviceInfo(int device);
std::string getPlatformInfo();
@@ -32,8 +31,6 @@ std::string getDriverVersion();
std::string getCUDARuntimeVersion();
-std::string getInfo();
-
bool isDoubleSupported(int device);
void devprop(char* d_name, char* d_platform, char *d_toolkit, char* d_compute);
@@ -82,7 +79,7 @@ class DeviceManager
friend std::string getCUDARuntimeVersion();
- friend std::string getInfo();
+ friend std::string getDeviceInfo();
friend int getDeviceCount();
diff --git a/src/backend/opencl/platform.cpp b/src/backend/opencl/platform.cpp
index c2c13c7..dc8ab4e 100644
--- a/src/backend/opencl/platform.cpp
+++ b/src/backend/opencl/platform.cpp
@@ -383,7 +383,7 @@ static std::string platformMap(std::string &platStr)
}
}
-std::string getInfo()
+std::string getDeviceInfo()
{
ostringstream info;
info << "ArrayFire v" << AF_VERSION
diff --git a/src/backend/opencl/platform.hpp b/src/backend/opencl/platform.hpp
index 095fdf9..42579f8 100644
--- a/src/backend/opencl/platform.hpp
+++ b/src/backend/opencl/platform.hpp
@@ -21,7 +21,7 @@ namespace opencl
class DeviceManager
{
- friend std::string getInfo();
+ friend std::string getDeviceInfo();
friend int getDeviceCount();
@@ -92,7 +92,7 @@ class DeviceManager
int getBackend();
-std::string getInfo();
+std::string getDeviceInfo();
int getDeviceCount();
--
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