Algorithmic aspects of convexity