瀏覽代碼

Fix crash when enabling bounds

Samuel Thibault 10 年之前
父節點
當前提交
d6b04d16b6
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      src/datawizard/footprint.c

+ 7 - 4
src/datawizard/footprint.c

@@ -55,11 +55,14 @@ uint32_t _starpu_compute_buffers_footprint(struct starpu_perfmodel *model, struc
 		}
 		else
 		{
-			struct starpu_perfmodel_per_arch *per_arch = starpu_perfmodel_get_model_per_arch(model, arch, nimpl);
-			if (per_arch != NULL && per_arch->size_base)
+			if (arch)
 			{
-				size_t size = per_arch->size_base(task, arch, nimpl);
-				footprint = starpu_hash_crc32c_be_n(&size, sizeof(size), footprint);
+				struct starpu_perfmodel_per_arch *per_arch = starpu_perfmodel_get_model_per_arch(model, arch, nimpl);
+				if (per_arch != NULL && per_arch->size_base)
+				{
+					size_t size = per_arch->size_base(task, arch, nimpl);
+					footprint = starpu_hash_crc32c_be_n(&size, sizeof(size), footprint);
+				}
 			}
 			else if (model->size_base)
 			{