Documentation
6b54b78464
Loading...
Searching...
No Matches
SwapBytes.hpp
Go to the documentation of this file.
1
/*!
2
* \file SwapBytes.hpp
3
* \brief Function to swap bytes of primitive data types.
4
* \author P. Gomes
5
* \version 8.5.0 "Harrier"
6
*
7
* SU2 Project Website: https://su2code.github.io
8
*
9
* The SU2 Project is maintained by the SU2 Foundation
10
* (http://su2foundation.org)
11
*
12
* Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13
*
14
* SU2 is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU Lesser General Public
16
* License as published by the Free Software Foundation; either
17
* version 2.1 of the License, or (at your option) any later version.
18
*
19
* SU2 is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22
* Lesser General Public License for more details.
23
*
24
* You should have received a copy of the GNU Lesser General Public
25
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26
*/
27
28
#pragma once
29
30
#include <cstddef>
31
#include <cstdint>
32
33
/*!
34
* \brief Change storage of buffer to/from big endian from/to little endian
35
* \param buffer - Pointer to the beginning of the buffer
36
* \param nBytes - The size in bytes of an data entry
37
* \param nVar - The number of entries
38
*/
39
void
SwapBytes
(
char
* buffer,
size_t
nBytes,
unsigned
long
nVar);
SwapBytes
void SwapBytes(char *buffer, size_t nBytes, unsigned long nVar)
Change storage of buffer to/from big endian from/to little endian.
Definition
SwapBytes.cpp:32
Common
include
toolboxes
SwapBytes.hpp
Generated by
1.9.8