DevIL: /home/dwoods/DevIL/src-IL/include/altivec_common.h Source File

- Main Page
- Data Structures
- Files

# /home/dwoods/DevIL/src-IL/include/altivec_common.h

    00001 /*
    00002  *  altivec_typeconversion.h
    00003  *  DevIL
    00004  *
    00005  *  Created by Meloni Dario on 17/04/05.
    00006  *
    00007  */
    00008
    00009 #include "il_internal.h"
    00010
    00011 #ifdef ALTIVEC_GCC
    00012 #ifndef ALTIVEC_COMMON
    00013 #define ALTIVEC_COMMON
    00014
    00015 typedef union {
    00016         vector unsigned int vuint;
    00017         unsigned int suint[4];
    00018         vector unsigned char vuchar;
    00019         unsigned char suchar[4];
    00020         vector float vf;
    00021         float sf[4];
    00022 } vector_t;
    00023
    00024 // Loads 16 byte from the specified address, aligned or not
    00025 //vector unsigned char load_unaligned( unsigned char *buffer );
    00026
    00027 // Fills a vector with the specified value
    00028 vector float fill_vector_f( float value );
    00029
    00030 #define eround(v,x) (((int)((v/x)*10)%10) > 0 ? (v/x) : (v/x)+1)
    00031 #define eround16(v) eround(v,16)
    00032
    00033 #endif
    00034 #endif