Archived
1
0
Fork 0

gnu: ceres: Update to 2.0.0.

* gnu/packages/maths.scm (ceres): Update to 2.0.0.
  [inputs]: Use simplified format.
  (ceres-solver-benchmarks)[phases]: Add schur_eliminator_benchmark.
  Replace autodiff_cost_function_benchmark with new autodiff_benchmarks.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Felix Gruber 2022-01-07 22:02:17 +00:00 committed by Ludovic Courtès
parent 86e196dd57
commit cd68fc1e42
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2437,7 +2437,7 @@ satisfiability checking (SAT).")
(define-public ceres (define-public ceres
(package (package
(name "ceres-solver") (name "ceres-solver")
(version "1.14.0") (version "2.0.0")
(home-page "http://ceres-solver.org/") (home-page "http://ceres-solver.org/")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
@ -2445,7 +2445,7 @@ satisfiability checking (SAT).")
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"13lfxy8x58w8vprr0nkbzziaijlh0vvqshgahvcgw0mrqdgh0i27")))) "00vng9vnmdb1qga01m0why90m0041w7bn6kxa2h4m26aflfqla8h"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
;; TODO: Build HTML user documentation and install separately. ;; TODO: Build HTML user documentation and install separately.
@ -2464,11 +2464,11 @@ satisfiability checking (SAT).")
(propagated-inputs (propagated-inputs
(list glog)) ;for #include <glog/glog.h> (list glog)) ;for #include <glog/glog.h>
(inputs (inputs
`(("eigen" ,eigen) (list eigen
("blas" ,openblas) openblas
("lapack" ,lapack) lapack
("suitesparse" ,suitesparse) suitesparse
("gflags" ,gflags))) gflags))
(synopsis "C++ library for solving large optimization problems") (synopsis "C++ library for solving large optimization problems")
(description (description
"Ceres Solver is a C++ library for modeling and solving large, "Ceres Solver is a C++ library for modeling and solving large,
@ -2506,21 +2506,24 @@ can solve two kinds of problems:
"pkg-config" "eigen3" "pkg-config" "eigen3"
"--cflags")))) "--cflags"))))
(define (compile-file file) (define (compile-file top-dir)
(let ((source (string-append file ".cc"))) (lambda (file)
(format #t "building '~a'...~%" file) (let ((source (string-append file ".cc")))
(apply invoke "c++" "-fopenmp" "-O2" "-g" "-DNDEBUG" (format #t "building '~a'...~%" file)
source "-lceres" "-lbenchmark" "-lglog" (apply invoke "c++" "-fopenmp" "-O2" "-g" "-DNDEBUG"
"-pthread" source "-lceres" "-lbenchmark" "-lglog"
"-o" (string-append bin "/" file) "-pthread"
"-I" ".." flags))) "-o" (string-append bin "/" file)
"-I" top-dir flags))))
(mkdir-p bin) (mkdir-p bin)
(with-directory-excursion "internal/ceres" (with-directory-excursion "internal/ceres"
(for-each compile-file (for-each (compile-file "..")
'("small_blas_gemm_benchmark" '("schur_eliminator_benchmark"
"small_blas_gemv_benchmark" "small_blas_gemm_benchmark"
"autodiff_cost_function_benchmark")))))) "small_blas_gemv_benchmark"))
(with-directory-excursion "autodiff_benchmarks"
((compile-file "../..") "autodiff_benchmarks"))))))
(delete 'check) (delete 'check)
(delete 'install)))) (delete 'install))))
(inputs (modify-inputs (package-inputs ceres) (inputs (modify-inputs (package-inputs ceres)