handle 0-sized dgemm properly in Yamamoto's alg