소스 검색

examples/cpp: skip example when no worker is available

Nathalie Furmento 8 년 전
부모
커밋
b250311d52
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      examples/cpp/add_vectors.cpp
  2. 2 0
      examples/cpp/add_vectors_cpp11.cpp

+ 2 - 0
examples/cpp/add_vectors.cpp

@@ -63,6 +63,8 @@ int main(int argc, char **argv)
 
 	// initialize StarPU with default configuration
 	int ret = starpu_init(NULL);
+	if (ret == -ENODEV)
+		return 77;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 	// StarPU data registering

+ 2 - 0
examples/cpp/add_vectors_cpp11.cpp

@@ -68,6 +68,8 @@ int main(int argc, char **argv)
 
 	// initialize StarPU with default configuration
 	auto ret = starpu_init(NULL);
+	if (ret == -ENODEV)
+		return 77;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 	// StarPU data registering