Crate arrayfire_serde [] [src]

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,
}

Structs

De

Wrapper tuple struct to provide serde::Deserialize trait for arrayfire types.

Ser

Wrapper tuple struct to provide serde::Serialize trait for arrayfire types.

Functions

deserialize

Exposed deserialization function used by the serde attributes:

serialize

Exposed serialization function used by the serde attributes: