relax type parameter from `GenericMemory` to `AbstractVector`