[][src]Function fil_ocl_core::util::into_bytes

pub unsafe fn into_bytes<T>(val: T) -> Vec<u8>

[UNTESTED] Copies an arbitrary primitive or struct into core bytes.

Depth

This is not a deep copy, will only copy the surface of primitives, structs, etc. Not 100% sure about what happens with other types but should copy everything zero levels deep.

Endianness

98% sure (speculative) this will always be correct due to the driver automatically taking it into account.

Safety

Don't ask.

[FIXME]: Evaluate the ins and outs of this and lock this down a bit.