Code generation for embedded convex optimization