Cannabis users looking for someone to share a joint with have a new app that lets them find like-minded smokers around the world.

The creator of the "Who is Happy" app, a Brazilian epilepsy sufferer who wants the drug decriminalized, says his software is a kind of "Foursquare for stoners", comparing it to the app that allows users to rate restaurants and other places they visit.

"The app is the first global platform of its kind allowing cannabis consumers to connect and unite to promote happiness while de-stigmatizing and hopefully decriminalizing cannabis use around the world," Paulo Costa said.

Users who anonymously log their location will see a green cloud appear on the app's map, covering a 1-km (half mile) radius. They can then check to see if others are partaking anywhere nearby, or elsewhere in the world. A greater number of users increases a location's "happiness" quotient.

Having been one of the top-30 downloaded apps in Brazil, the app ranks the home nation as the biggest user and therefore the happiest country.

Cannabis has been decriminalized for recreational and medical use in some U.S. states but is illegal in Brazil.