mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-04-17 14:10:11 +02:00
Cleaned AO file
This commit is contained in:
parent
1be1a99529
commit
5b6404db92
1443
org/qmckl_ao.org
1443
org/qmckl_ao.org
File diff suppressed because it is too large
Load Diff
@ -76,9 +76,9 @@ def parse_table(table):
|
||||
result = []
|
||||
|
||||
for line in [ [x.replace('~','') for x in y] for y in table]:
|
||||
d = { "c_type" : line[1].split('[')[0],
|
||||
d = { "name" : line[0],
|
||||
"c_type" : line[1],
|
||||
"inout" : line[2].lower(),
|
||||
"name" : line[0],
|
||||
"comment" : line[3] }
|
||||
|
||||
# Handle inout
|
||||
@ -95,7 +95,7 @@ def parse_table(table):
|
||||
if d["rank"] == 0:
|
||||
d["dims"] = []
|
||||
else:
|
||||
d["name"] = d["name"].split('[')[0].strip()
|
||||
d["c_type"] = d["c_type"].split('[')[0].strip()
|
||||
d["dims"] = [ x.replace(']','').strip() for x in dims[1:] ]
|
||||
|
||||
result.append(d)
|
||||
@ -106,7 +106,7 @@ def parse_table(table):
|
||||
*** Generates a C header
|
||||
|
||||
#+NAME: generate_c_header
|
||||
#+BEGIN_SRC python :var table=test :var rettyp=[] :var fname=[] :results drawer :noweb yes :wrap "src c :tangle (eval h_func) :comments org"
|
||||
#+BEGIN_SRC python :var table=test :var rettyp="qmckl_exit_code" :var fname=[] :results drawer :noweb yes :wrap "src c :tangle (eval h_func) :comments org"
|
||||
<<parse_table>>
|
||||
|
||||
results = []
|
||||
@ -137,20 +137,21 @@ return template
|
||||
|
||||
#+RESULTS: generate_c_header
|
||||
#+begin_src c :tangle (eval h_func) :comments org
|
||||
[] [] (
|
||||
const context qmckl_context,
|
||||
const transa char,
|
||||
const transb char,
|
||||
const m int64_t,
|
||||
const n int64_t,
|
||||
const A* double,
|
||||
const lda int64_t,
|
||||
const B* double,
|
||||
const ldb int64_t,
|
||||
C* const double,
|
||||
const ldc int64_t );
|
||||
qmckl_exit_code [] (
|
||||
const qmckl_context context,
|
||||
const char transa,
|
||||
const char transb,
|
||||
const int64_t m,
|
||||
const int64_t n,
|
||||
const double* A,
|
||||
const int64_t lda,
|
||||
const double* B,
|
||||
const int64_t ldb,
|
||||
double* const C,
|
||||
const int64_t ldc );
|
||||
#+end_src
|
||||
|
||||
|
||||
*** Generates a C interface to the Fortran function
|
||||
|
||||
#+NAME: generate_c_interface
|
||||
|
Loading…
x
Reference in New Issue
Block a user