1/* 2 * Copyright (c) 2015 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 233 unchanged lines hidden (view full) --- 242 } 243 244 private: 245 CircleBuf<value_type> buf; 246}; 247 248 249template <typename T> |
250void |
251arrayParamOut(CheckpointOut &cp, const std::string &name, 252 const CircleBuf<T> ¶m) 253{ 254 std::vector<T> temp(param.size()); 255 param.peek(temp.begin(), temp.size()); 256 arrayParamOut(cp, name, temp); 257} 258 259template <typename T> |
260void |
261arrayParamIn(CheckpointIn &cp, const std::string &name, 262 CircleBuf<T> ¶m) 263{ 264 std::vector<T> temp; 265 arrayParamIn(cp, name, temp); 266 267 param.flush(); 268 param.write(temp.cbegin(), temp.size()); 269} 270 271template <typename T> |
272void |
273arrayParamOut(CheckpointOut &cp, const std::string &name, 274 const Fifo<T> ¶m) 275{ 276 std::vector<T> temp(param.size()); 277 param.peek(temp.begin(), temp.size()); 278 arrayParamOut(cp, name, temp); 279} 280 281template <typename T> |
282void |
283arrayParamIn(CheckpointIn &cp, const std::string &name, 284 Fifo<T> ¶m) 285{ 286 std::vector<T> temp; 287 arrayParamIn(cp, name, temp); 288 289 fatal_if(param.capacity() < temp.size(), 290 "Trying to unserialize data into too small FIFO\n"); 291 292 param.flush(); 293 param.write(temp.cbegin(), temp.size()); 294} 295 296#endif // __BASE_CIRCLEBUF_HH__ |