1 unstable release
Uses old Rust 2015
0.1.0 | Nov 10, 2017 |
---|
#6 in #array-fire
12KB
213 lines
arrayfire_serde
The arrayfire_serde rust crate implements serde support for arrayfire types.
License
arrayfire_serde is distributed under the terms of MIT licence.
lib.rs
:
arrayfire_serde
provides serde
serialization and deserialization support for arrayfire
types.
The implementation is still experimental and lacking in many aspects.
As of now the supported types are:
arrayfire::Array
(non-complex internal type)arrayfire::Dim4
arrayfire::DType
Examples
Using the derive
generators with structures
that contain arrayfire
types as members.
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate arrayfire;
extern crate arrayfire_serde;
#[derive(Serialize, Deserialize)]
struct MyStruct {
#[serde(with = "arrayfire_serde")]
tensor: arrayfire::Array,
#[serde(with = "arrayfire_serde")]
sliding_window: arrayfire::Dim4,
}
Dependencies
~1.7–2.5MB
~53K SLoC