[arrayfire] 55/284: api name change for afcl external context functionality
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:18 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 d41839f93a6177eff294192b12b37f52232fe6ff
Author: pradeep <pradeep at arrayfire.com>
Date: Fri Dec 4 15:39:57 2015 -0500
api name change for afcl external context functionality
---
include/af/opencl.h | 12 ++++++------
src/backend/opencl/platform.cpp | 12 ++++++------
src/backend/opencl/platform.hpp | 8 ++++----
test/ocl_ext_context.cpp | 12 ++++++------
4 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/include/af/opencl.h b/include/af/opencl.h
index 6a81142..88e47d2 100644
--- a/include/af/opencl.h
+++ b/include/af/opencl.h
@@ -80,7 +80,7 @@ AFAPI af_err afcl_set_device_id(cl_device_id id);
that are defined in the `cl.hpp` OpenCL c++ header provided by Khronos Group Inc. Therefore, please
be aware of the lifetime of the cl_* objects before passing them to ArrayFire.
*/
-AFAPI af_err afcl_push_device_context(cl_device_id dev, cl_context ctx, cl_command_queue que);
+AFAPI af_err afcl_add_device_context(cl_device_id dev, cl_context ctx, cl_command_queue que);
#endif
#if AF_API_VERSION >= 33
@@ -107,7 +107,7 @@ AFAPI af_err afcl_set_device_context(cl_device_id dev, cl_context ctx);
by this func call and you won't be able to call `afcl_set_device_context` on these objects after
this function has been called.
*/
-AFAPI af_err afcl_pop_device_context(cl_device_id dev, cl_context ctx);
+AFAPI af_err afcl_delete_device_context(cl_device_id dev, cl_context ctx);
#endif
/**
@@ -211,9 +211,9 @@ namespace afcl
that are defined in the `cl.hpp` OpenCL c++ header provided by Khronos Group Inc. Therefore, please
be aware of the lifetime of the cl_* objects before passing them to ArrayFire.
*/
-static inline void pushDevice(cl_device_id dev, cl_context ctx, cl_command_queue que)
+static inline void addDevice(cl_device_id dev, cl_context ctx, cl_command_queue que)
{
- af_err err = afcl_push_device_context(dev, ctx, que);
+ af_err err = afcl_add_device_context(dev, ctx, que);
if (err!=AF_SUCCESS) throw af::exception("Failed to push user provided device/context to ArrayFire pool");
}
#endif
@@ -246,9 +246,9 @@ static inline void setDevice(cl_device_id dev, cl_context ctx)
by this func call and you won't be able to call `afcl_set_device_context` on these objects after
this function has been called.
*/
-static inline void popDevice(cl_device_id dev, cl_context ctx)
+static inline void deleteDevice(cl_device_id dev, cl_context ctx)
{
- af_err err = afcl_pop_device_context(dev, ctx);
+ af_err err = afcl_delete_device_context(dev, ctx);
if (err!=AF_SUCCESS) throw af::exception("Failed to remove the requested device from ArrayFire device pool");
}
#endif
diff --git a/src/backend/opencl/platform.cpp b/src/backend/opencl/platform.cpp
index 32ba72d..510cb50 100644
--- a/src/backend/opencl/platform.cpp
+++ b/src/backend/opencl/platform.cpp
@@ -473,7 +473,7 @@ void DeviceManager::markDeviceForInterop(const int device, const fg::Window* wHa
}
#endif
-void pushDeviceContext(cl_device_id dev, cl_context ctx, cl_command_queue que)
+void addDeviceContext(cl_device_id dev, cl_context ctx, cl_command_queue que)
{
try {
DeviceManager& devMngr = DeviceManager::getInstance();
@@ -510,7 +510,7 @@ void setDeviceContext(cl_device_id dev, cl_context ctx)
AF_ERROR("No matching device found", AF_ERR_ARG);
}
-void popDeviceContext(cl_device_id dev, cl_context ctx)
+void removeDeviceContext(cl_device_id dev, cl_context ctx)
{
try {
if (getDevice()() == dev && getContext()()==ctx) {
@@ -586,9 +586,9 @@ af_err afcl_set_device_id(cl_device_id id)
return AF_SUCCESS;
}
-af_err afcl_push_device_context(cl_device_id dev, cl_context ctx, cl_command_queue que)
+af_err afcl_add_device_context(cl_device_id dev, cl_context ctx, cl_command_queue que)
{
- pushDeviceContext(dev, ctx, que);
+ addDeviceContext(dev, ctx, que);
return AF_SUCCESS;
}
@@ -598,8 +598,8 @@ af_err afcl_set_device_context(cl_device_id dev, cl_context ctx)
return AF_SUCCESS;
}
-af_err afcl_pop_device_context(cl_device_id dev, cl_context ctx)
+af_err afcl_delete_device_context(cl_device_id dev, cl_context ctx)
{
- popDeviceContext(dev, ctx);
+ removeDeviceContext(dev, ctx);
return AF_SUCCESS;
}
diff --git a/src/backend/opencl/platform.hpp b/src/backend/opencl/platform.hpp
index 022cd7e..154d84b 100644
--- a/src/backend/opencl/platform.hpp
+++ b/src/backend/opencl/platform.hpp
@@ -43,11 +43,11 @@ class DeviceManager
friend int setDevice(int device);
- friend void pushDeviceContext(cl_device_id dev, cl_context cxt, cl_command_queue que);
+ friend void addDeviceContext(cl_device_id dev, cl_context cxt, cl_command_queue que);
friend void setDeviceContext(cl_device_id dev, cl_context cxt);
- friend void popDeviceContext(cl_device_id dev, cl_context ctx);
+ friend void removeDeviceContext(cl_device_id dev, cl_context ctx);
public:
static const unsigned MAX_DEVICES = 32;
@@ -107,11 +107,11 @@ std::string getPlatformName(const cl::Device &device);
int setDevice(int device);
-void pushDeviceContext(cl_device_id dev, cl_context cxt, cl_command_queue que);
+void addDeviceContext(cl_device_id dev, cl_context cxt, cl_command_queue que);
void setDeviceContext(cl_device_id dev, cl_context cxt);
-void popDeviceContext(cl_device_id dev, cl_context ctx);
+void removeDeviceContext(cl_device_id dev, cl_context ctx);
void sync(int device);
diff --git a/test/ocl_ext_context.cpp b/test/ocl_ext_context.cpp
index 6b9b480..0d4f89b 100644
--- a/test/ocl_ext_context.cpp
+++ b/test/ocl_ext_context.cpp
@@ -61,11 +61,11 @@ TEST(OCLExtContext, push)
getExternals(deviceId, context, queue);
int dCount = af::getDeviceCount();
- printf("%d devices before afcl::pushDevice\n", dCount);
+ printf("%d devices before afcl::addDevice\n", dCount);
af::info();
- afcl::pushDevice(deviceId, context, queue);
+ afcl::addDevice(deviceId, context, queue);
ASSERT_EQ(true, dCount+1==af::getDeviceCount());
- printf("%d devices after afcl::pushDevice\n", af::getDeviceCount());
+ printf("%d devices after afcl::addDevice\n", af::getDeviceCount());
af::info();
}
@@ -97,12 +97,12 @@ TEST(OCLExtContext, pop)
getExternals(deviceId, context, queue);
int dCount = af::getDeviceCount();
- printf("%d devices before afcl::popDevice\n", dCount);
+ printf("%d devices before afcl::deleteDevice\n", dCount);
af::setDevice(0);
af::info();
- afcl::popDevice(deviceId, context);
+ afcl::deleteDevice(deviceId, context);
ASSERT_EQ(true, dCount-1==af::getDeviceCount());
- printf("%d devices after afcl::popDevice\n", af::getDeviceCount());
+ printf("%d devices after afcl::deleteDevice\n", af::getDeviceCount());
af::info();
}
#else
--
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