-// Copyright (C) 2018 Intel Corporation
+// Copyright (C) 2018-2019 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
void setLayout(Layout l) {
bool inconsistentLayout = true;
switch (l) {
+ case Layout::SCALAR:
+ inconsistentLayout = !dims.empty();
+ break;
case Layout::C:
inconsistentLayout = dims.size() != 1;
break;
break;
}
if (inconsistentLayout)
- THROW_IE_EXCEPTION << "Dims(" << std::to_string(dims.size()) << ") and format(" << std::to_string(l) << ") are inconsistent.";
+ THROW_IE_EXCEPTION << "Size of dims(" << std::to_string(dims.size()) << ") and format(" << l << ") are inconsistent.";
layout = l;
}