## Copying

Copying — Copy and rearrangement function classes

##

# Synopsis

    void        oil_copy_u8                     (uint8_t *dest,
                                                 const uint8_t *src,
                                                 int n);
    void        oil_permute_f32                 (float *dest,
                                                 int dstr,
                                                 const float *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);
    void        oil_permute_f64                 (double *dest,
                                                 int dstr,
                                                 const double *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);
    void        oil_permute_s16                 (int16_t *dest,
                                                 int dstr,
                                                 const int16_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);
    void        oil_permute_s32                 (int32_t *dest,
                                                 int dstr,
                                                 const int32_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);
    void        oil_permute_s8                  (int8_t *dest,
                                                 int dstr,
                                                 const int8_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);
    void        oil_permute_u16                 (uint16_t *dest,
                                                 int dstr,
                                                 const uint16_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);
    void        oil_permute_u32                 (uint32_t *dest,
                                                 int dstr,
                                                 const uint32_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);
    void        oil_permute_u8                  (uint8_t *dest,
                                                 int dstr,
                                                 const uint8_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);
    void        oil_splat_u32                   (uint32_t *dest,
                                                 int dstr,
                                                 const uint32_t *s1_1,
                                                 int n);
    void        oil_splat_u8                    (uint8_t *dest,
                                                 int dstr,
                                                 const uint8_t *s1_1,
                                                 int n);
    void        oil_tablelookup_u8              (uint8_t *d,
                                                 int ds,
                                                 const uint8_t *s1,
                                                 int ss1,
                                                 const uint8_t *s2_256,
                                                 int ss2,
                                                 int n);
    void        oil_trans8x8_f64                (double *d_8x8,
                                                 int ds,
                                                 const double *s_8x8,
                                                 int ss);
    void        oil_trans8x8_u16                (uint16_t *d_8x8,
                                                 int ds,
                                                 const uint16_t *s_8x8,
                                                 int ss);
    void        oil_trans8x8_u32                (uint32_t *d_8x8,
                                                 int ds,
                                                 const uint32_t *s_8x8,
                                                 int ss);
    void        oil_trans8x8_u8                 (uint8_t *d_8x8,
                                                 int ds,
                                                 const uint8_t *s_8x8,
                                                 int ss);
    void        oil_unzigzag8x8_s16             (int16_t *d_8x8,
                                                 int ds,
                                                 const int16_t *s_8x8,
                                                 int ss);
    void        oil_zigzag8x8_s16               (int16_t *d_8x8,
                                                 int ds,
                                                 const int16_t *s_8x8,
                                                 int ss);
    void        oil_splat_u32_ns                (uint32_t *dest,
                                                 const uint32_t *s1_1,
                                                 int n);
    void        oil_splat_u8_ns                 (uint8_t *dest,
                                                 const uint8_t *s1_1,
                                                 int n);
    #define     oil_trans8x8_s16                (dest, dstr, src, sstr)
    #define     oil_memcpy                      (dest,src,n_bytes)

## Description

These functions copy data from source array to destination array, sometimes modifying position in the array.

## Details

### oil_copy_u8 ()

    void        oil_copy_u8                     (uint8_t *dest,
                                                 const uint8_t *src,
                                                 int n);

Copies the source array to the destination array with no modification. This function is identical to `memcpy()`.

`dest` : |
`src` : |
`n` : |

### oil_permute_f32 ()

    void        oil_permute_f32                 (float *dest,
                                                 int dstr,
                                                 const float *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);

`dest` : |
`dstr` : |
`src1` : |
`sstr1` : |
`src2` : |
`sstr2` : |
`n` : |

### oil_permute_f64 ()

    void        oil_permute_f64                 (double *dest,
                                                 int dstr,
                                                 const double *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);

`dest` : |
`dstr` : |
`src1` : |
`sstr1` : |
`src2` : |
`sstr2` : |
`n` : |

### oil_permute_s16 ()

    void        oil_permute_s16                 (int16_t *dest,
                                                 int dstr,
                                                 const int16_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);

`dest` : |
`dstr` : |
`src1` : |
`sstr1` : |
`src2` : |
`sstr2` : |
`n` : |

### oil_permute_s32 ()

    void        oil_permute_s32                 (int32_t *dest,
                                                 int dstr,
                                                 const int32_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);

`dest` : |
`dstr` : |
`src1` : |
`sstr1` : |
`src2` : |
`sstr2` : |
`n` : |

### oil_permute_s8 ()

    void        oil_permute_s8                  (int8_t *dest,
                                                 int dstr,
                                                 const int8_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);

`dest` : |
`dstr` : |
`src1` : |
`sstr1` : |
`src2` : |
`sstr2` : |
`n` : |

### oil_permute_u16 ()

    void        oil_permute_u16                 (uint16_t *dest,
                                                 int dstr,
                                                 const uint16_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);

`dest` : |
`dstr` : |
`src1` : |
`sstr1` : |
`src2` : |
`sstr2` : |
`n` : |

### oil_permute_u32 ()

    void        oil_permute_u32                 (uint32_t *dest,
                                                 int dstr,
                                                 const uint32_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);

`dest` : |
`dstr` : |
`src1` : |
`sstr1` : |
`src2` : |
`sstr2` : |
`n` : |

### oil_permute_u8 ()

    void        oil_permute_u8                  (uint8_t *dest,
                                                 int dstr,
                                                 const uint8_t *src1,
                                                 int sstr1,
                                                 const int32_t *src2,
                                                 int sstr2,
                                                 int n);

`dest` : |
`dstr` : |
`src1` : |
`sstr1` : |
`src2` : |
`sstr2` : |
`n` : |

### oil_splat_u32 ()

    void        oil_splat_u32                   (uint32_t *dest,
                                                 int dstr,
                                                 const uint32_t *s1_1,
                                                 int n);

Copies the value in the source array to each element in the destination array.

`dest` : |
`dstr` : |
`s1_1` : |
`n` : |

### oil_splat_u8 ()

    void        oil_splat_u8                    (uint8_t *dest,
                                                 int dstr,
                                                 const uint8_t *s1_1,
                                                 int n);

Copies the value in the source array to each element in the destination array.

`dest` : |
`dstr` : |
`s1_1` : |
`n` : |

### oil_tablelookup_u8 ()

    void        oil_tablelookup_u8              (uint8_t *d,
                                                 int ds,
                                                 const uint8_t *s1,
                                                 int ss1,
                                                 const uint8_t *s2_256,
                                                 int ss2,
                                                 int n);

`d` : |
`ds` : |
`s1` : |
`ss1` : |
`s2_256` : |
`ss2` : |
`n` : |

### oil_trans8x8_f64 ()

    void        oil_trans8x8_f64                (double *d_8x8,
                                                 int ds,
                                                 const double *s_8x8,
                                                 int ss);

Transposes the source array.

`d_8x8` : |
`ds` : |
`s_8x8` : |
`ss` : |

### oil_trans8x8_u16 ()

    void        oil_trans8x8_u16                (uint16_t *d_8x8,
                                                 int ds,
                                                 const uint16_t *s_8x8,
                                                 int ss);

Transposes the source array.

`d_8x8` : |
`ds` : |
`s_8x8` : |
`ss` : |

### oil_trans8x8_u32 ()

    void        oil_trans8x8_u32                (uint32_t *d_8x8,
                                                 int ds,
                                                 const uint32_t *s_8x8,
                                                 int ss);

Transposes the source array.

`d_8x8` : |
`ds` : |
`s_8x8` : |
`ss` : |

### oil_trans8x8_u8 ()

    void        oil_trans8x8_u8                 (uint8_t *d_8x8,
                                                 int ds,
                                                 const uint8_t *s_8x8,
                                                 int ss);

Transposes the source array.

`d_8x8` : |
`ds` : |
`s_8x8` : |
`ss` : |

### oil_unzigzag8x8_s16 ()

    void        oil_unzigzag8x8_s16             (int16_t *d_8x8,
                                                 int ds,
                                                 const int16_t *s_8x8,
                                                 int ss);

`d_8x8` : |
`ds` : |
`s_8x8` : |
`ss` : |

### oil_zigzag8x8_s16 ()

    void        oil_zigzag8x8_s16               (int16_t *d_8x8,
                                                 int ds,
                                                 const int16_t *s_8x8,
                                                 int ss);

`d_8x8` : |
`ds` : |
`s_8x8` : |
`ss` : |

### oil_splat_u32_ns ()

    void        oil_splat_u32_ns                (uint32_t *dest,
                                                 const uint32_t *s1_1,
                                                 int n);

Requires version 0.3.2

`dest` : |
`s1_1` : |
`n` : |

### oil_splat_u8_ns ()

    void        oil_splat_u8_ns                 (uint8_t *dest,
                                                 const uint8_t *s1_1,
                                                 int n);

Requires version 0.3.2

`dest` : |
`s1_1` : |
`n` : |

### oil_trans8x8_s16()

    #define     oil_trans8x8_s16(dest, dstr, src, sstr)

Requires version 0.3.2

`dest` : |
`dstr` : |
`src` : |
`sstr` : |

### oil_memcpy()

    #define     oil_memcpy(dest,src,n_bytes)

Copies data from a source location to destination. Similar to `memcpy()`.

`dest` : | pointer to destination memory
`src` : | pointer to source memory
`n_bytes` : | number of bytes to copy