The GAP project - GPU for real-time applications in high energy physics and medical imaging