MCPcopy Create free account
hub / github.com/Samsung/ONE / resize

Method resize

runtime/3rdparty/jsoncpp/jsoncpp.cpp:3592–3612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3590}
3591
3592void Value::resize(ArrayIndex newSize)
3593{
3594 JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue,
3595 "in Json::Value::resize(): requires arrayValue");
3596 if (type() == nullValue)
3597 *this = Value(arrayValue);
3598 ArrayIndex oldSize = size();
3599 if (newSize == 0)
3600 clear();
3601 else if (newSize > oldSize)
3602 for (ArrayIndex i = oldSize; i < newSize; ++i)
3603 (*this)[i];
3604 else
3605 {
3606 for (ArrayIndex index = newSize; index < oldSize; ++index)
3607 {
3608 value_.map_->erase(index);
3609 }
3610 JSON_ASSERT(size() == newSize);
3611 }
3612}
3613
3614Value &Value::operator[](ArrayIndex index)
3615{

Callers 15

codePointToUTF8Function · 0.45
recoverFromErrorMethod · 0.45
valueToStringFunction · 0.45
unindentMethod · 0.45
Softmax.cppFile · 0.45
addClNodeMethod · 0.45
readConstTensorMethod · 0.45
visitMethod · 0.45
mainFunction · 0.45
readJpegMethod · 0.45
registerModelMethod · 0.45

Calls 5

clearFunction · 0.85
typeFunction · 0.50
ValueFunction · 0.50
sizeFunction · 0.50
eraseMethod · 0.45

Tested by 7

setDataMethod · 0.36
setDataMethod · 0.36
SGDOptimizerVerifierMethod · 0.36
AdamOptimizerVerifierMethod · 0.36
MockUpTensorMethod · 0.36
MockUpLayerMethod · 0.36
TESTFunction · 0.36