/usr/include/oclgrind/Kernel.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 | // Kernel.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"
#include "llvm/ADT/StringRef.h"
namespace llvm
{
class Argument;
class Constant;
class Function;
class GlobalVariable;
class MDNode;
class Metadata;
class Module;
}
namespace oclgrind
{
class Memory;
class Program;
class Kernel
{
public:
Kernel(const Program *program,
const llvm::Function *function, const llvm::Module *module);
Kernel(const Kernel& kernel);
virtual ~Kernel();
TypedValueMap::const_iterator values_begin() const;
TypedValueMap::const_iterator values_end() const;
bool allArgumentsSet() const;
void allocateConstants(Memory *memory);
void deallocateConstants(Memory *memory);
unsigned int getArgumentAccessQualifier(unsigned int index) const;
unsigned int getArgumentAddressQualifier(unsigned int index) const;
const llvm::StringRef getArgumentName(unsigned int index) const;
size_t getArgumentSize(unsigned int index) const;
const llvm::StringRef getArgumentTypeName(unsigned int index) const;
unsigned int getArgumentTypeQualifier(unsigned int index) const;
std::string getAttributes() const;
const llvm::Function* getFunction() const;
size_t getLocalMemorySize() const;
const std::string& getName() const;
unsigned int getNumArguments() const;
const Program* getProgram() const;
void getRequiredWorkGroupSize(size_t reqdWorkGroupSize[3]) const;
void setArgument(unsigned int index, TypedValue value);
private:
const Program *m_program;
const llvm::Function *m_function;
std::list<const llvm::GlobalVariable*> m_constants;
std::list<size_t> m_constantBuffers;
const llvm::MDNode *m_metadata;
std::string m_name;
TypedValueMap m_values;
const llvm::Argument* getArgument(unsigned int index) const;
const llvm::Metadata* getArgumentMetadata(std::string name,
unsigned int index) const;
};
}
|