SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
Macros | Functions
sion_convert.c File Reference

originally written for VISIT: perform byte-order swapping for arrays More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#include "sion.h"
#include "sion_debug.h"
Include dependency graph for sion_convert.c:

Go to the source code of this file.

Macros

#define _XOPEN_SOURCE   700
 

Functions

void sion_swap (void *target, void *source, int size, int n, int do_swap)
 

Detailed Description

originally written for VISIT: perform byte-order swapping for arrays

Author
Th.Eickermann & W.Frings (December 2000)

Definition in file sion_convert.c.

Function Documentation

◆ sion_swap()

void sion_swap ( void *  target,
void *  source,
int  size,
int  n,
int  do_swap 
)

@ brief Perform byte-order swapping for arrays

n elements of size bytes each are swapped if do_swap is true. In-place swapping (target == source) is allowed. If target != source, the buffers must not overlap.

Parameters
[out]targetthe byte-swapped data is written starting at this address
[in]sourcethe data to be byte-swapped is read starting at this address
[in]sizethe size (in bytes) of a single element
[in]nthe number of elements to be byte-swapped
[in]do_swapbyte-swapping is only performed if this argument is true

Definition at line 44 of file sion_convert.c.

Referenced by fsion_swap_c().