Megasthenes, the Greek ambassador to the Mauryan court, identified Vishnu (or Krishna-Vasudeva) with the Greek deity Heracles in his work 'Indica.' This was part of the Greek practice of interpretatio graeca, equating foreign deities with their own gods. Shiva would correspond to Dionysus, not Heracles.