Fix -Werror=switch.

Change-Id: Ib0850a3f79308efeeecd18bb03ecd82bd355ef85
This commit is contained in:
Michael LIAO
2020-03-03 16:36:37 -05:00
committato da Michael Hong Bin Liao
parent 3d64a38953
commit f70a66a7b3
+11 -1
Vedi File
@@ -186,6 +186,8 @@ cl_mem_object_type getCLMemObjectType(const hipResourceType hipResType) {
return CL_MEM_OBJECT_IMAGE1D;
case hipResourceTypePitch2D:
return CL_MEM_OBJECT_IMAGE2D;
default:
break;
}
ShouldNotReachHere();
@@ -330,6 +332,8 @@ hipArray_Format getArrayFormat(const hipChannelFormatDesc& desc) {
case 32:
return HIP_AD_FORMAT_FLOAT;
}
default:
break;
}
ShouldNotReachHere();
@@ -364,6 +368,8 @@ int getNumChannels(const hipResourceViewFormat hipFormat) {
case hipResViewFormatHalf4:
case hipResViewFormatFloat4:
return 4;
default:
break;
}
ShouldNotReachHere();
@@ -406,6 +412,8 @@ hipArray_Format getArrayFormat(const hipResourceViewFormat hipFormat) {
case hipResViewFormatFloat2:
case hipResViewFormatFloat4:
return HIP_AD_FORMAT_FLOAT;
default:
break;
}
ShouldNotReachHere();
@@ -500,6 +508,8 @@ hipResourceViewFormat getResourceViewFormat(const hipChannelFormatDesc& desc) {
return hipResViewFormatFloat4;
}
}
default:
break;
}
ShouldNotReachHere();
@@ -636,4 +646,4 @@ _HIP_MEMCPY3D getMemcpy3DParms(const hip_Memcpy2D& desc2D) {
return desc3D;
}
};
};