#include <cstdint>
Go to the source code of this file.
Macros | |
#define | OCLOC_MAKE_VERSION(_major, _minor) ((_major << 16) | (_minor & 0x0000ffff)) |
Generates ocloc API versions. More... | |
#define | SIGNATURE int |
Typedefs | |
typedef enum _ocloc_version_t | ocloc_version_t |
Enumerations | |
enum | _ocloc_version_t { OCLOC_VERSION_1_0 = OCLOC_MAKE_VERSION(1, 0) , OCLOC_VERSION_CURRENT = OCLOC_MAKE_VERSION(1, 0) , OCLOC_VERSION_FORCE_UINT32 = 0x7fffffff } |
Functions | |
SIGNATURE | oclocInvoke (uint32_t NumArgs, const char *Argv[], uint32_t NumSources, const uint8_t **DataSources, const uint64_t *LenSources, const char **NameSources, uint32_t NumInputHeaders, const uint8_t **DataInputHeaders, const uint64_t *LenInputHeaders, const char **NameInputHeaders, uint32_t *NumOutputs, uint8_t ***DataOutputs, uint64_t **LenOutputs, char ***NameOutputs) |
Invokes ocloc API using C interface. More... | |
SIGNATURE | oclocFreeOutput (uint32_t *NumOutputs, uint8_t ***DataOutputs, uint64_t **LenOutputs, char ***NameOutputs) |
Frees results of oclocInvoke. More... | |
SIGNATURE | oclocVersion () |
Returns the current version of ocloc. More... | |
#define OCLOC_MAKE_VERSION | ( | _major, | |
_minor | |||
) | ((_major << 16) | (_minor & 0x0000ffff)) |
Generates ocloc API versions.
Definition at line 16 of file ocloc_api.h.
#define SIGNATURE int |
Definition at line 29 of file ocloc_api.h.
typedef enum _ocloc_version_t ocloc_version_t |
enum _ocloc_version_t |
Enumerator | |
---|---|
OCLOC_VERSION_1_0 | version 1.0 |
OCLOC_VERSION_CURRENT | latest known version |
OCLOC_VERSION_FORCE_UINT32 |
Definition at line 20 of file ocloc_api.h.
SIGNATURE oclocFreeOutput | ( | uint32_t * | NumOutputs, |
uint8_t *** | DataOutputs, | ||
uint64_t ** | LenOutputs, | ||
char *** | NameOutputs | ||
) |
Frees results of oclocInvoke.
NumOutputs | is number of outputs as returned by oclocInvoke(). |
DataOutputs | is array of outputs as returned by oclocInvoke(). |
LenOutputs | is array of sizes of outputs as returned by oclocInvoke(). |
NameOutputs | is array of names of outputs as returned by oclocInvoke() |
Referenced by sycl::_V1::ext::__SYCL2020_DEPRECATED(), sycl::_V1::ext::oneapi::experimental::detail::InvokeOclocQuery(), and sycl::_V1::ext::oneapi::experimental::detail::OpenCLC_to_SPIRV().
SIGNATURE oclocInvoke | ( | uint32_t | NumArgs, |
const char * | Argv[], | ||
uint32_t | NumSources, | ||
const uint8_t ** | DataSources, | ||
const uint64_t * | LenSources, | ||
const char ** | NameSources, | ||
uint32_t | NumInputHeaders, | ||
const uint8_t ** | DataInputHeaders, | ||
const uint64_t * | LenInputHeaders, | ||
const char ** | NameInputHeaders, | ||
uint32_t * | NumOutputs, | ||
uint8_t *** | DataOutputs, | ||
uint64_t ** | LenOutputs, | ||
char *** | NameOutputs | ||
) |
Invokes ocloc API using C interface.
Supported commands match the functionality of ocloc executable (check ocloc's "help" for reference : shared/offline_compiler/source/ocloc_api.cpp) at https://github.com/intel/compute-runtime.
NumArgs and argv params represent the command line. Remaining params represent I/O. Output params should be freed using oclocFreeOutput() when no longer needed. List and names of outputs match outputs of ocloc executable.
NumArgs | is the number of arguments to pass to ocloc. |
Argv | is an array of arguments to be passed to ocloc. |
NumSources | is the number of in-memory representations of source files to be passed to ocloc. |
DataSources | is an array of in-memory representations of source files to be passed to ocloc. |
LenSources | is an array of sizes of in-memory representations of source files passed to ocloc as DataSources. |
NameSources | is an array of names of in-memory representations of source files passed to ocloc as DataSources. |
NumInputHeaders | is the number of in-memory representations of header files to be passed to ocloc. |
DataInputHeaders | is an array of in-memory representations of header files to be passed to ocloc. |
LenInputHeaders | is an array of sizes of in-memory representations of header files passed to ocloc as DataInputHeaders. |
NameInputHeaders | is an array of names of in-memory representations of header files passed to ocloc as DataInputHeaders. |
NumOutputs | returns the number of outputs. |
DataOutputs | returns an array of in-memory representations of output files. |
LenOutputs | returns an array of sizes of in-memory representations of output files. |
NameOutputs | returns an array of names of in-memory representations of output files. Special name stdout.log describes output that contains messages generated by ocloc (e.g. compiler errors/warnings). |
Referenced by sycl::_V1::ext::__SYCL2020_DEPRECATED(), sycl::_V1::ext::oneapi::experimental::detail::InvokeOclocQuery(), and sycl::_V1::ext::oneapi::experimental::detail::OpenCLC_to_SPIRV().
SIGNATURE oclocVersion | ( | ) |
Returns the current version of ocloc.
Referenced by sycl::_V1::ext::__SYCL2020_DEPRECATED(), and sycl::_V1::ext::oneapi::experimental::detail::checkOclocLibrary().