Intelligent all-fiber device: storage and logic computing