]> gitweb.factorcode.org Git - factor.git/commitdiff
math.blas.config: add deploy-blas? variable
authorJoe Groff <arcata@gmail.com>
Tue, 16 Feb 2010 21:38:29 +0000 (13:38 -0800)
committerJoe Groff <arcata@gmail.com>
Tue, 16 Feb 2010 21:38:29 +0000 (13:38 -0800)
basis/math/blas/config/config-docs.factor
basis/math/blas/config/config.factor
basis/math/blas/ffi/ffi.factor

index 5c6cef83b8d8e3c5c910d51ed5565370256a1fc5..826f26c64617d5ea0d662389a7a2cf63ee6bde15 100644 (file)
@@ -6,20 +6,25 @@ ARTICLE: "math.blas.config" "Configuring the BLAS interface"
 { $subsections
     blas-library
     blas-fortran-abi
+    deploy-blas?
 }
 "The interface attempts to set default values based on the ones encountered on the Factor project's build machines. If these settings don't work with your system's BLAS, or you wish to use a commercial BLAS, you may change the global values of those variables in your " { $link "factor-rc" } ". For example, to use AMD's ACML library on Windows with " { $snippet "math.blas" } ", your " { $snippet "factor-rc" } " would look like this:"
 { $code """
 USING: math.blas.config namespaces ;
 "X:\\path\\to\\acml.dll" blas-library set-global
 intel-windows-abi blas-fortran-abi set-global
+t deploy-blas? set-global
 """ }
 "To take effect, the " { $snippet "blas-library" } " and " { $snippet "blas-fortran-abi" } " variables must be set before any other " { $snippet "math.blas" } " vocabularies are loaded."
 ;
 
 HELP: blas-library
-{ $description "The name of the shared library containing the BLAS interface to load. The value of this variable must be a valid shared library name that can be passed to " { $link add-fortran-library } ". To take effect, this variable must be set before any other " { $snippet "math.blas" } " vocabularies are loaded. See " { $link "math.blas.config" } " for details and examples." } ;
+{ $var-description "The name of the shared library containing the BLAS interface to load. The value of this variable must be a valid shared library name that can be passed to " { $link add-fortran-library } ". To take effect, this variable must be set before any other " { $snippet "math.blas" } " vocabularies are loaded. See " { $link "math.blas.config" } " for details and examples." } ;
 
 HELP: blas-fortran-abi
-{ $description "The Fortran ABI used by the BLAS interface specified in the " { $link blas-library } " variable. The value of " { $snippet "blas-fortran-abi" } " must be one of the " { $link "alien.fortran-abis" } " that can be passed to " { $link add-fortran-library } ". To take effect, this variable must be set before any other " { $snippet "math.blas" } " vocabularies are loaded. See " { $link "math.blas.config" } " for details and examples." } ;
+{ $var-description "The Fortran ABI used by the BLAS interface specified in the " { $link blas-library } " variable. The value of " { $snippet "blas-fortran-abi" } " must be one of the " { $link "alien.fortran-abis" } " that can be passed to " { $link add-fortran-library } ". To take effect, this variable must be set before any other " { $snippet "math.blas" } " vocabularies are loaded. See " { $link "math.blas.config" } " for details and examples." } ;
+
+HELP: deploy-blas?
+{ $var-description "If set to a true value, the BLAS library will be configured to deploy with applications that use it. To take effect, this variable must be set before any other " { $snippet "math.blas" } " vocabularies are loaded. See " { $link "math.blas.config" } " for details and examples." } ;
 
 ABOUT: "math.blas.config"
index bce6e663af63eed8e5bb8e9d0f72131d224dd177..76524d80ee716a838bcd15b10de165080f67b852 100644 (file)
@@ -1,7 +1,7 @@
 USING: alien.fortran combinators kernel namespaces system ;
 IN: math.blas.config
 
-SYMBOLS: blas-library blas-fortran-abi ;
+SYMBOLS: blas-library blas-fortran-abi deploy-blas? ;
 
 blas-library [
     {
@@ -21,3 +21,5 @@ blas-fortran-abi [
         [ f2c-abi ]
     } cond
 ] initialize
+
+deploy-blas? [ os macosx? not ] initialize
index b7748f500f825db77ea536c4d19cfd928a3a7bdf..5cc6a18b6d9996cce1a6e9ae6a09fa1e0b90ba1a 100644 (file)
@@ -1,9 +1,12 @@
 USING: alien.fortran kernel math.blas.config namespaces ;
+FROM: alien.libraries => deploy-library ;
 IN: math.blas.ffi
 
 <<
 "blas" blas-library blas-fortran-abi [ get ] bi@
 add-fortran-library
+
+deploy-blas? get [ "blas" deploy-library ] when
 >>
 
 LIBRARY: blas