| 8a4ce0d7 | 19-Nov-2020 |
Jeremy L Thompson <25011573+jeremylt@users.noreply.github.com> |
Rust interface (#602)
* WIP - first rust files for bindgen
* WIP - more boilerplate, closer to building
* WIP - bindgen builds
* WIP - add Rust job to Travis
* WIP - fix malformed Travis
Rust interface (#602)
* WIP - first rust files for bindgen
* WIP - more boilerplate, closer to building
* WIP - bindgen builds
* WIP - add Rust job to Travis
* WIP - fix malformed Travis yml
* WIP - set Travis to most recent Rust
* WIP - fix include path
* WIP - update travis to specify install/after_success stages
* WIP - add cargo test to Travis job
* WIP - fix linking, for now
* WIP - rust is hard
* Ctx - update notes for Fortran usage
* WIP - small updates
* Fortran - drop unneeded cast
Co-authored-by: Jed Brown <jed@jedbrown.org>
* WIP - more tweaks
* basic skeleton.
* some cleaning.
* Drop the ceed module.
* Move the modules.
* fix mods in vector
* Rewrite vector constructor.
* Scope more precisely unsafe.
* Rename rust_ceed to bind_ceed
* Simplify Vector
* Simplifications
* Add code for ElemRestriction
* Add basis create
* Add create for operator.
* minor
* Interface - use void* for SetData interfaces
* Make - use call quiet for NVCC
* Interface - use void* for GetData interfaces
* WIP - first rust files for bindgen
* WIP - more boilerplate, closer to building
* WIP - bindgen builds
* WIP - add Rust job to Travis
* WIP - fix malformed Travis yml
* WIP - set Travis to most recent Rust
* WIP - fix include path
* WIP - update travis to specify install/after_success stages
* WIP - add cargo test to Travis job
* WIP - fix linking, for now
* WIP - rust is hard
* WIP - small updates
* WIP - more tweaks
* basic skeleton.
* some cleaning.
* Drop the ceed module.
* Move the modules.
* fix mods in vector
* Rewrite vector constructor.
* Scope more precisely unsafe.
* Rename rust_ceed to bind_ceed
* Simplify Vector
* Simplifications
* Add code for ElemRestriction
* Add basis create
* Add create for operator.
* minor
* WIP - add doctest for vector constructor
* rust: cargo fmt
* Add some functions to vector
* Fix rust enum C enum correspondance.
* Add create_tensor_H1_Lagrange
* Add create_H1 in Basis.
* Add basis functions to Ceed.
* rust: use std::ptr::null_mut instead of malloc to get a mutable pointer
* Add apply to Basis.
* WIP - documentation for basis_tensor_H1_Lagrange
* Add accessors and destructor to Basis.
* WIP - more documentation
* WIP - cargo fmt
* WIP - more tests
* Move TransposeMode in lib.rs
* Add constructors and apply to elem_restriction.rs
* WIP - remove extra whitespace
* Add accessors and destructor to ElemRestriction.
* WIP - add some more destructors and such
* WIP - add context constructor to ceed
* WIP - document sync
* make Basis ptr pub.
* make ElemRestriction ptr pub.
* add functions to Operator.
* Add other functions to Operator.
* WIP - add set_array
* WIP - put enums in lib.rs
* rust: use usize for lengths instead of i32
This offers better interop with other Rust libraries. Rust is safer
for avoiding overflow/unsigned bugs.
* rust: create vectors from slices
* WIP - add len
* WIP - hide ceed init in doctest
* WIP - add default init for testing
* WIP - switch set_array to ndarray
* WIP - add get_array/restore_array
* WIP - add get/restore_array_read
* WIP - add basis test code
* WIP - add some elemrestriction testing
* WIP - add basis apply test
* WIP - add display for ceed, vec, rstr, basis
* WIP - use core object for shared functionality for qf/op variants
* WIP - style consistency
* WIP - drop blocked restrictions for now
* WIP - minor style
* WIP - add copyright stuff
* WIP - more documentation stubs
* rust: Vector: use views (coercing to slices) as alternative to unsafe get/restore array
* rust: silence some warnings
* cargo fmt
* close code block
* add constants
* collapse qfunctions back to one class, but still need to find a way to keep users from adding fields/context to by_name qfs
* add viewing of operator tests, shows issue with operator create (but not composite)
* fix printing test, needed to add filds
* basic operator apply and apply_add tests work
* add t501 as main test of entire rust interface
* switch to usize for restr, basis args
* drop get_array, get_array_read
* add mutable view
* clean up tests a little
* minor uniformity
* more uniformity
* clean up dependencies
* drop ndarray and set_array
* drop CopyMode from public interface
* simplify setting LD_LIBRARY_PATH for Travis
* small cleaning
* Remove allow dead_code
* Add Eq to the enum types.
* Refactor unsafe block
* Remove heap allocation of string
* Reorganize use
* Refactor unsafe block
* Refactor Vector
* Rewrite Display for Basis
* Rewrite Display for Ceed
* Rewrite vector_active and vector_none.
* Remove lifetime and use Option type.
* Refactor Display functions
* Remove unused interface.
* Move fmt and CString in the prelude.
* Add minimal doc
* move allow dead_code for ffi only.
* Rename variables.
* Move exceptions in the prelude and change max_buffer_size to uppercase.
* Add a reference counted Ceed struct.
* Revert "Add a reference counted Ceed struct."
This reverts commit 019eb95b99cf0ade62ea19f39e1adb118d209121.
* Remove dead code.
* make OperatorCore pub(crate)/
* Add some documentation.
* cargo fmt
* allow dead code only for OwnPointer, as will never be used
* add tests for diagonal assembly
* drop lazy static as dep
* add cargo fmt to travis
* modify rustfmt in Travis per example
* Rust - list as v0.7
* Rust - add ElemRstrGetVectors
* Rust - drop context
* Rust - return operator tuple from multigrid level creation
* Rust - add test for multigrid creation
* Rust - full set of multigrid tests
* Rust - fmt docstrings
* Rust - style fixes
* minor
* minor doc styling
* Rust - subclass QFunctions
* rust - basic docs info
* restrict some data
* rust - incomplete impl of using closures
* rust - possible qfunction closure solution
* rust - add qf tests, there is a bug (as expected because nothing runs correctly the first time)
* rust - qfunctions seem to work
* rust - assemble pbd tests
* rust - drop qf source, for now GPU not supported, so single source not valuable
* rust - add comment about context usage
* rust - add some composite operator tests/examples
* Travis - add doc deployment
* travis - minor changes to prevent warnings
* travis - deploy on jeremy/rust for testing
* Travis - update url on travis deployment of rust docs
* Rust - doc style fixes
* Rust - use libceed as package name for consistency, add all enums to prelude
* cargo fmt
* travis - minor url fix
* Docs - add Rust docs link
* docs - fix title to include Rust
* Some suggestions.
- avoid anything that can panic inside unsafe blocks (e.g. casting)
- use slice in favor of Vec
- add Basis, ElemRestriction, Operator, QFunction, Vector to the prelude
- Reorganize some of the unsafe blocks
Co-authored-by: Adrien Champion <ptitbatt@hotmail.com>
* rustfmt
* Forgot one
* Switch vec to slice in operator.
* Rust - small test updates
* Rust - drop to_string() for QFunctionByName
* Rust - add doc deployment action
* Rust - gcc not needed for Rust doc deployment
* Rust - temp doc deployment on dev branch
* Rust - rename doc job to build
* Rust - add doc index redirect
* Rust - use &str over String in QFunctionByName
* Rust - use &str for field names as well
* Rust - use MAX_QFUNCTION_FIELDS over 16
* Rust - use high order function in some qf examples
* Rust - more qf editing
* Rust - spelling
* Rust - add debug assertions for all Opts
* Rust - use more idiomatic return in user QFunction examples
* Rust - fmt
* Rust - drop extra lines
* Rust - add a few comments for future ref
* Rust - minor wording
* Rust - minor
* Rust - update QF user function signature
* Rust - minor wording
* Rust - use rust formatting for high order function line breaks
* rust: slightly streamline suggested qfunction notation
* Rust - propegate QF signature improvement
* Rust - drop q from user QF signature
* Rust - fmt
* Rust - minor comments to help readers
* rust: cleaner type signatures on QFunction closures
* rust: infer return type in qfunction closure
* Rust - propegate improved signature
* Rust - more propegation
* Docs - updates with Rust build instructions
* formatting
* more documentation
---
Rust interface initial version
Co-authored-by: Jed Brown <jed@jedbrown.org>
Co-authored-by: Yohann Dudouit <dudouit1@llnl.gov>
Co-authored-by: Adrien Champion <ptitbatt@hotmail.com>
show more ...
|