Blender  V2.93
endian_switch.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include "BLI_endian_switch.h"
22 #include "BLI_sys_types.h"
23 #include "BLI_utildefines.h"
24 
25 void BLI_endian_switch_int16_array(short *val, const int size)
26 {
27  if (size > 0) {
28  int i = size;
29  while (i--) {
31  }
32  }
33 }
34 
35 void BLI_endian_switch_uint16_array(unsigned short *val, const int size)
36 {
37  if (size > 0) {
38  int i = size;
39  while (i--) {
41  }
42  }
43 }
44 
45 void BLI_endian_switch_int32_array(int *val, const int size)
46 {
47  if (size > 0) {
48  int i = size;
49  while (i--) {
51  }
52  }
53 }
54 
55 void BLI_endian_switch_uint32_array(unsigned int *val, const int size)
56 {
57  if (size > 0) {
58  int i = size;
59  while (i--) {
61  }
62  }
63 }
64 
65 void BLI_endian_switch_float_array(float *val, const int size)
66 {
67  if (size > 0) {
68  int i = size;
69  while (i--) {
71  }
72  }
73 }
74 
76 {
77  if (size > 0) {
78  int i = size;
79  while (i--) {
81  }
82  }
83 }
84 
86 {
87  if (size > 0) {
88  int i = size;
89  while (i--) {
91  }
92  }
93 }
94 
95 void BLI_endian_switch_double_array(double *val, const int size)
96 {
97  if (size > 0) {
98  int i = size;
99  while (i--) {
101  }
102  }
103 }
BLI_INLINE void BLI_endian_switch_uint64(uint64_t *val) ATTR_NONNULL(1)
BLI_INLINE void BLI_endian_switch_uint16(unsigned short *val) ATTR_NONNULL(1)
BLI_INLINE void BLI_endian_switch_int64(int64_t *val) ATTR_NONNULL(1)
BLI_INLINE void BLI_endian_switch_double(double *val) ATTR_NONNULL(1)
BLI_INLINE void BLI_endian_switch_int32(int *val) ATTR_NONNULL(1)
BLI_INLINE void BLI_endian_switch_uint32(unsigned int *val) ATTR_NONNULL(1)
BLI_INLINE void BLI_endian_switch_int16(short *val) ATTR_NONNULL(1)
BLI_INLINE void BLI_endian_switch_float(float *val) ATTR_NONNULL(1)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
void BLI_endian_switch_uint32_array(unsigned int *val, const int size)
Definition: endian_switch.c:55
void BLI_endian_switch_float_array(float *val, const int size)
Definition: endian_switch.c:65
void BLI_endian_switch_uint16_array(unsigned short *val, const int size)
Definition: endian_switch.c:35
void BLI_endian_switch_int16_array(short *val, const int size)
Definition: endian_switch.c:25
void BLI_endian_switch_double_array(double *val, const int size)
Definition: endian_switch.c:95
void BLI_endian_switch_int64_array(int64_t *val, const int size)
Definition: endian_switch.c:75
void BLI_endian_switch_uint64_array(uint64_t *val, const int size)
Definition: endian_switch.c:85
void BLI_endian_switch_int32_array(int *val, const int size)
Definition: endian_switch.c:45
__int64 int64_t
Definition: stdint.h:92
unsigned __int64 uint64_t
Definition: stdint.h:93