Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a chris::init() function
This will support one-time initialisation of my own modifications, and
is executed automatically by skelcl::init().
  • Loading branch information
ChrisCummins committed Feb 5, 2015
1 parent 6bfd865 commit 996a2a9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/SkelCL/Chris.h
Expand Up @@ -15,10 +15,16 @@
#include <CL/cl.h>
#pragma GCC diagnostic pop // -Weffc++

#include <pvsutil/Logger.h>

#include "detail/Program.h"

namespace chris {

///
/// Initialise "stuff".
///
void init();

///
/// Return the number of partitions to use for a given inputBuffer and
Expand Down
4 changes: 4 additions & 0 deletions src/Chris.cpp
Expand Up @@ -50,6 +50,10 @@ namespace ClFlags {
} // ClFlags


void init() {
LOG_INFO("Using Chris' modifications");
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
const char *get_cl_flags(skelcl::detail::Program *const program,
Expand Down
3 changes: 3 additions & 0 deletions src/SkelCL.cpp
Expand Up @@ -40,6 +40,7 @@
#include <pvsutil/Logger.h>

#include "SkelCL/SkelCL.h"
#include "SkelCL/Chris.h"

#include "SkelCL/detail/DeviceList.h"
#include "SkelCL/detail/DeviceProperties.h"
Expand All @@ -50,11 +51,13 @@ namespace skelcl {

void init(detail::DeviceProperties properites)
{
chris::init();
detail::globalDeviceList.init(std::move(properites));
}

void init(detail::PlatformID pID, detail::DeviceID dID)
{
chris::init();
detail::globalDeviceList.init(pID, dID);
}

Expand Down

0 comments on commit 996a2a9

Please sign in to comment.