Code Generation for In-Memory Data Analytics