You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
doCalcNew.codon
LIBRARY='/shd/privato/bridge/bin/dds-develop/src/libdds.so'
import numpy as np
from C import LIBRARY.CalcDDtable(np.ndarray[u32, 2], Ptr[i32]) -> i32
dl = np.array([[u32(24640), u32(16680), u32( 9216), u32( 1824)],
[u32( 2180), u32(14404), u32( 2344), u32( 2048)],
[u32( 1792), u32( 656), u32( 4112), u32(24772)],
[u32( 4152), u32( 1024), u32(17092), u32( 4120)]])
res = np.array([[i32(0), i32(0), i32(0), i32(0), i32(0)],
[i32(0), i32(0), i32(0), i32(0), i32(0)],
[i32(0), i32(0), i32(0), i32(0), i32(0)],
[i32(0), i32(0), i32(0), i32(0), i32(0)]])
print(f'dl.flags={dl.flags}')
print(f'res.flags={res.flags}')
#dl.flagsobj.OWNDATA = True
#res.flagsobj.OWNDATA = True
err = CalcDDtable(dl, res.data)
'''
// C++ definitions:
struct ddTableResults {int resTable[5][4];}
struct ddTableDeal {unsigned int cards[4][4];}
int CalcDDtable(struct ddTableDeal tableDeal, struct ddTableResults *tablep)
'''
end of codon source
codon run doCalcNew.codon:
dl.flags= C_CONTIGUOUS : True
F_CONTIGUOUS : False
OWNDATA : False
WRITEABLE : True
ALIGNED : True
WRITEBACKIFCOPY : False
res.flags= C_CONTIGUOUS : True
F_CONTIGUOUS : False
OWNDATA : False
WRITEABLE : True
ALIGNED : True
WRITEBACKIFCOPY : False
Segmentation fault codon run doCalcNew.codon
All reactions