Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBronder committed Jan 20, 2018
1 parent 293cbac commit 3cfb5d6
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions stan/math/prim/mat/fun/ocl_gpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,20 @@ inline void init_kernel_groups() {

kernel_strings["timing"] = dummy_kernel;
kernel_strings["check_gpu"] =
#include <stan/math/prim/mat/kern_gpu/check_gpu.cl> // NOLINT
; // NOLINT
#include <stan/math/prim/mat/kern_gpu/check_gpu.cl> // NOLINT
; // NOLINT
kernel_strings["cholesky_decomposition"] =
#include <stan/math/prim/mat/kern_gpu/cholesky_decomposition.cl> // NOLINT
; // NOLINT
#include <stan/math/prim/mat/kern_gpu/cholesky_decomposition.cl> // NOLINT
; // NOLINT
kernel_strings["matrix_inverse"] =
#include <stan/math/prim/mat/kern_gpu/matrix_inverse.cl> // NOLINT
; // NOLINT
kernel_strings["matrix_multiply"] =
#include <stan/math/prim/mat/kern_gpu/matrix_multiply.cl> // NOLINT
#include <stan/math/prim/mat/kern_gpu/matrix_inverse.cl> // NOLINT
; // NOLINT
kernel_strings["matrix_multiply"] =
#include <stan/math/prim/mat/kern_gpu/matrix_multiply.cl> // NOLINT
; // NOLINT
kernel_strings["basic_matrix"] =
#include <stan/math/prim/mat/kern_gpu/basic_matrix.cl> // NOLINT
; // NOLINT
#include <stan/math/prim/mat/kern_gpu/basic_matrix.cl> // NOLINT
; // NOLINT

// Check if the kernels were already compiled
compiled_kernels["basic_matrix"] = false;
Expand All @@ -113,7 +113,7 @@ inline void init_kernel_groups() {
*
*/
class ocl {
private:
private:
std::string description_;
cl::Context oclContext_;
cl::CommandQueue oclQueue_;
Expand All @@ -138,9 +138,9 @@ class ocl {
exit(1);
}
oclDevice_ = allDevices[0];
description_ = "Device " + oclDevice_.getInfo<CL_DEVICE_NAME>() +
" on the platform " +
oclPlatform_.getInfo<CL_PLATFORM_NAME>();
description_ = "Device " + oclDevice_.getInfo<CL_DEVICE_NAME>()
+ " on the platform "
+ oclPlatform_.getInfo<CL_PLATFORM_NAME>();
allDevices[0].getInfo<size_t>(CL_DEVICE_MAX_WORK_GROUP_SIZE,
&max_workgroup_size);
oclContext_ = cl::Context(allDevices);
Expand All @@ -166,7 +166,7 @@ class ocl {
}
}

public:
public:
inline std::string description() const {
if (initialized_ == 1) {
return description_;
Expand Down Expand Up @@ -258,12 +258,12 @@ inline void compile_kernel_group(std::string group) {
cl_int err = CL_SUCCESS;
// Iterate over the kernel list
// and get all the kernels from this group
for (std::map<std::string, std::string>::iterator it =
kernel_groups.begin();
for (std::map<std::string, std::string>::iterator it
= kernel_groups.begin();
it != kernel_groups.end(); ++it) {
if (group.compare((it->second).c_str()) == 0) {
kernels[(it->first).c_str()] =
cl::Kernel(program_, (it->first).c_str(), &err);
kernels[(it->first).c_str()]
= cl::Kernel(program_, (it->first).c_str(), &err);
}
}
} catch (const cl::Error &e) {
Expand All @@ -290,7 +290,7 @@ inline cl::Kernel get_kernel(std::string name) {
return kernels[name];
}

} // namespace math
} // namespace stan
} // namespace math
} // namespace stan

#endif

0 comments on commit 3cfb5d6

Please sign in to comment.