gpu.c: extract_context: handle empty schedule domain
In the current transitionary state, kernels may get created that
may not get used in the end. In particular, if the entire program
fragment is empty, then a kernel object will be created even though
it will not end up being used. During the creation of this kernel,
extract_context will get called on a schedule with no domain elements,
resulting in a (harmless) error message since extract_context does
not take this possibility into account.
In the long run, only kernels that will actually be used will
be created. In the mean time, make extract_context handle
empty schedule domains.
Reported-by: Michael Kruse <MichaelKruse@meinersbur.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>