Merge branch 'master' of git://factorcode.org/git/factor
commit
e36376b432
|
@ -1,13 +1,19 @@
|
|||
USING: alien alien.c-types alien.syntax kernel system combinators ;
|
||||
IN: math.blas.cblas
|
||||
|
||||
<< "cblas" {
|
||||
<<
|
||||
: load-atlas ( -- )
|
||||
"atlas" "libatlas.so" "cdecl" add-library
|
||||
"atlas" load-library drop ;
|
||||
|
||||
"cblas" {
|
||||
{ [ os macosx? ] [ "libblas.dylib" "cdecl" add-library ] }
|
||||
{ [ os windows? ] [ "blas.dll" "cdecl" add-library ] }
|
||||
{ [ os openbsd? ] [ "libcblas.so" "cdecl" add-library ] }
|
||||
{ [ os freebsd? ] [ "libcblas.so" "cdecl" add-library ] }
|
||||
{ [ os freebsd? ] [ "libcblas.so" "cdecl" add-library load-atlas ] }
|
||||
[ "libblas.so" "cdecl" add-library ]
|
||||
} cond >>
|
||||
} cond
|
||||
>>
|
||||
|
||||
LIBRARY: cblas
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ void init_ffi(void)
|
|||
|
||||
void ffi_dlopen(F_DLL *dll)
|
||||
{
|
||||
dll->dll = dlopen(alien_offset(dll->path), RTLD_LAZY);
|
||||
dll->dll = dlopen(alien_offset(dll->path), RTLD_LAZY|RTLD_GLOBAL);
|
||||
}
|
||||
|
||||
void *ffi_dlsym(F_DLL *dll, F_SYMBOL *symbol)
|
||||
|
|
Loading…
Reference in New Issue