ae2f_docs
Loading...
Searching...
No Matches
aclspv.h
Go to the documentation of this file.
1/**
2 * @file aclspv.h
3 * Compiles OpenCL C kernel code to SPIR-V for Vulkan.
4 * */
5
6#ifndef aclspv_h
7#define aclspv_h
8
9#include <ae2f/Keys.h>
10#include <ae2f/cc.h>
11
12#include "./aclspv/abi.h"
13#include "./aclspv/spvty.h"
14
15#include <clang-c/Index.h>
16
17typedef enum {
18 ACLSPV_COMPILE_OK,
19 ACLSPV_COMPILE_ALLOC_FAILED,
20 ACLSPV_COMPILE_MET_INVAL,
21 ACLSPV_COMPILE_ERR_CLANG,
22 ACLSPV_COMPILE_TOO_BIG,
23 ACLSPV_COMPILE_NO_IMPL,
24 ACLSPV_COMPILE_WORKGROUP_MUST_BE_CONSTANT_ARRAY,
25 ACLSPV_COMPILE_STORAGE_CLASS_UNDEFINED
26} e_aclspv_compile_t;
27
28/**
29 * @fn aclspv_compile
30 * @brief compile files and generate spir-v for vulkan
31 * @returns <INIT:aclspv_free_obj>
32 * */
33ae2f_extern ACLSPV_ABI_DECL e_aclspv_compile_t
34aclspv_compile(
35 struct CXUnsavedFile* ae2f_restrict const rdwr_unsaved,
36 const unsigned c_unsaved_count,
37 const char* ae2f_restrict const * ae2f_restrict const rd_argv_opt,
38 const int c_argc,
39 aclspv_wrdcount_t* ae2f_restrict rwr_output_count_opt,
41 enum CXErrorCode* ae2f_restrict rwr_cxerr_opt
42 );
43
44#endif
#define unless(a)
Invokes when condition is false.
Definition Keys.h:34
#define ae2f_extern
Suggests the existence of external variable or function, in naming of C. [non-mangling].
Definition Keys.h:25
#define ae2f_NIL
Definition Nil.h:13
#define ACLSPV_ABI_DECL
Declaration as ABI.
Definition abi.h:23
#define STATE_VAL
#define FNINFO
#define ae2f_assume(a)
tells the compiler that value if a is false, below this keyword is not expected to be reached.
Definition cc.h:228
#define ae2f_unexpected_but_if(a)
Definition cc.h:192
#define ae2f_expected_but_else(a)
Definition cc.h:201
#define ae2f_restrict
Keyword as restrict on C99.
Definition cc.h:81
#define ae2f_expected_not(a)
expectes a as false.
Definition cc.h:185
#define ae2f_unreachable()
tells the compiler that below this keyword is not expected to be reached.
Definition cc.h:213
#define ae2f_expected(a)
expectes a as true.
Definition cc.h:184
#define get_buf_from_scale(h_alloc, c_scale)
Definition scale.h:34
aclspv_wrd_t aclspv_wrdcount_t
the integer type represents the number of word.
Definition spvty.h:61
#define aclspv_wrd_t
integer as word
Definition spvty.h:16
aclspv_id_t m_id
id
Definition ctx.h:50
aclspv_wrdcount_t m_num_cursor
number of m_cursors. for its use see util/cursor.h
Definition ctx.h:41
util_bind_unified m_unified
Definition bind.h:20
#define emit_opcode(h_wrds, c_wrdcount, c_opcode, c_num_opprm_opt)
try emit opcode with num_opprm
Definition wrdemit.h:75
#define get_wrd_of_vec(vec)
get word buffer from vector
Definition wrdemit.h:38
#define count_to_sz(c_count)
word count to byte size
Definition wrdemit.h:32