packet.hh (7687:d1ba390671ec) packet.hh (7691:358c00c482f7)
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * Copyright (c) 2010 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

700 void set(T v);
701
702 /**
703 * Copy data into the packet from the provided pointer.
704 */
705 void
706 setData(uint8_t *p)
707 {
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * Copyright (c) 2010 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

700 void set(T v);
701
702 /**
703 * Copy data into the packet from the provided pointer.
704 */
705 void
706 setData(uint8_t *p)
707 {
708 std::memcpy(getPtr<uint8_t>(), p, getSize());
708 if (p != getPtr<uint8_t>())
709 std::memcpy(getPtr<uint8_t>(), p, getSize());
709 }
710
711 /**
712 * Copy data into the packet from the provided block pointer,
713 * which is aligned to the given block size.
714 */
715 void
716 setDataFromBlock(uint8_t *blk_data, int blkSize)

--- 100 unchanged lines hidden ---
710 }
711
712 /**
713 * Copy data into the packet from the provided block pointer,
714 * which is aligned to the given block size.
715 */
716 void
717 setDataFromBlock(uint8_t *blk_data, int blkSize)

--- 100 unchanged lines hidden ---