/usr/include/oclgrind/Program.h is in liboclgrind-dev 16.10-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | // Program.h (Oclgrind)
// Copyright (c) 2013-2016, James Price and Simon McIntosh-Smith,
// University of Bristol. All rights reserved.
//
// This program is provided under a three-clause BSD license. For full
// license terms please see the LICENSE file distributed with this
// source code.
#include "common.h"
namespace llvm
{
class Function;
class Module;
class StoreInst;
}
namespace oclgrind
{
class Context;
class InterpreterCache;
class Kernel;
class Program
{
public:
typedef std::pair<std::string, const Program*> Header;
public:
Program(const Context *context, const std::string& source);
virtual ~Program();
static Program* createFromBitcode(const Context *context,
const unsigned char *bitcode,
size_t length);
static Program* createFromBitcodeFile(const Context *context,
const std::string filename);
static Program* createFromPrograms(const Context *context,
std::list<const Program*>);
bool build(const char *options,
std::list<Header> headers = std::list<Header>());
Kernel* createKernel(const std::string name);
const std::string& getBuildLog() const;
const std::string& getBuildOptions() const;
void getBinary(unsigned char *binary) const;
size_t getBinarySize() const;
unsigned int getBuildStatus() const;
const Context *getContext() const;
const InterpreterCache* getInterpreterCache(
const llvm::Function *kernel) const;
std::list<std::string> getKernelNames() const;
unsigned int getNumKernels() const;
const std::string& getSource() const;
const char* getSourceLine(size_t lineNumber) const;
size_t getNumSourceLines() const;
unsigned long getUID() const;
private:
Program(const Context *context, llvm::Module *module);
std::unique_ptr<llvm::Module> m_module;
std::string m_source;
std::string m_buildLog;
std::string m_buildOptions;
unsigned int m_buildStatus;
const Context *m_context;
std::vector<std::string> m_sourceLines;
unsigned long m_uid;
unsigned long generateUID() const;
void pruneDeadCode(llvm::Instruction*);
void removeLValueLoads();
void scalarizeAggregateStore(llvm::StoreInst *store);
void stripDebugIntrinsics();
typedef std::map<const llvm::Function*, InterpreterCache*>
InterpreterCacheMap;
mutable InterpreterCacheMap m_interpreterCache;
void clearInterpreterCache();
};
}
|