mem64.hh (14134:aa53bf965d64) mem64.hh (14150:1391e94a7b95)
1/*
2 * Copyright (c) 2011-2013,2017 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

--- 292 unchanged lines hidden (view full) ---

301 op(b, a, c);
302 }
303 private:
304 T a;
305 T c;
306 std::function<void(T*, T, T)> op;
307};
308
1/*
2 * Copyright (c) 2011-2013,2017 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

--- 292 unchanged lines hidden (view full) ---

301 op(b, a, c);
302 }
303 private:
304 T a;
305 T c;
306 std::function<void(T*, T, T)> op;
307};
308
309template<typename T>
310class AtomicGenericPair3Op : public TypedAtomicOpFunctor<T>
311{
312 public:
313 AtomicGenericPair3Op(std::array<T, 2>& _a, std::array<T, 2> _c,
314 std::function<void(T*, std::array<T, 2>&, std::array<T, 2>)> _op)
315 : a(_a), c(_c), op(_op)
316 {}
317 AtomicOpFunctor* clone() override
318 {
319 return new AtomicGenericPair3Op<T>(*this);
320 }
321 void execute(T* b) override
322 {
323 op(b, a, c);
324 }
325 private:
326 std::array<T, 2> a;
327 std::array<T, 2> c;
328 std::function<void(T*, std::array<T, 2>&, std::array<T, 2>)> op;
329};
330
309}
310
311#endif //__ARCH_ARM_INSTS_MEM_HH__
331}
332
333#endif //__ARCH_ARM_INSTS_MEM_HH__