Architectures and Algorithms for Intrinsic Computation with Memristive Devices