16 unsigned short int *u = v;
17 int j,ulen = vlen ? *vlen : 0;
18 for (j=0; j<ulen; j++) {
19 u[j] = bswap16bits(u[j]);
26 unsigned short int *u = v;
27 const unsigned short int *uin = vin;
28 int j,ulen = vlen ? *vlen : 0;
29 for (j=0; j<ulen; j++) {
30 u[j] = bswap16bits(uin[j]);
38 int j,ulen = vlen ? *vlen : 0;
39 for (j=0; j<ulen; j++) {
40 u[j] = bswap32bits(u[j]);
48 const unsigned int *uin = vin;
49 int j,ulen = vlen ? *vlen : 0;
50 for (j=0; j<ulen; j++) {
51 u[j] = bswap32bits(uin[j]);
59 int j,ulen = vlen ? *vlen : 0;
60 for (j=0; j<ulen; j++) {
61 u[j] = bswap64bits(u[j]);
70 int j,ulen = vlen ? *vlen : 0;
71 for (j=0; j<ulen; j++) {
72 u[j] = bswap64bits(uin[j]);
78 const char *dtype_name,
const char *varname)
87 "swapANYbytes_ifsaux(%s:%s): elsize=%d, n=%d, dtype=%u (0x%x)\n",
88 dtype_name, varname, elsize, n, dtype, dtype);
90 "\tpmethod=%u,sign=%u,bswaple=%u,prec=%u,base=%u,other=%u (0x%x)\n",
91 u.t.pmethod,u.t.signbit,u.t.byte_swappable,u.t.precision_bits,
92 u.t.base_type,u.t.other_type);
94 if (u.t.byte_swappable) {
95 double bits = (1 << u.t.precision_bits);
97 fprintf(stderr,
"\tbits=%.20g := 2^%u\n",bits,u.t.precision_bits);
99 if (bits == 16 && elsize == 2) {
102 else if (bits == 32 && elsize == 4) {
105 else if (bits == 64 && elsize == 8) {
110 " ***Error in swapANYbytes_ifsaux() [elsize=%d]: Can't swap bytes for dtype=0x%x (type=%s, var='%s')\n",
111 elsize, dtype, dtype_name, varname);
113 "signbit=%u, byte_swappable=%u, precision_bits=%u, base_type=%u, other_type=0x%x (%u)\n",
114 u.t.signbit, u.t.byte_swappable, u.t.precision_bits,
115 u.t.base_type, u.t.other_type, u.t.other_type);
PUBLIC void swap1bytes_ifsaux_(void *v, const int *vlen)
unsigned long long int u_ll_t
PUBLIC void swap4bytes_ifsaux_via_copy_(void *v, const void *vin, const int *vlen)
PUBLIC void swap8bytes_ifsaux_via_copy_(void *v, const void *vin, const int *vlen)
PUBLIC void swap2bytes_ifsaux_via_copy_(void *v, const void *vin, const int *vlen)
PUBLIC void swap8bytes_ifsaux_(void *v, const int *vlen)
PUBLIC void swap4bytes_ifsaux_(void *v, const int *vlen)
PUBLIC void swapANYbytes_ifsaux_(void *v, int elsize, int n, unsigned int dtype, const char *dtype_name, const char *varname)
PUBLIC void swap2bytes_ifsaux_(void *v, const int *vlen)
subroutine t(CDPREF, CDSUFF, KCODPA, LDNIVA, PMULTI)