Added libspe2 parallel Cell SPE support contribution by IBM Germany 'Extreme Blue' project:
Thanks to Benjamin Hoeferlin, Minh Cuong Tran,Martina Huellmann,Frederick Roth.
This commit is contained in:
@@ -1,44 +1,72 @@
|
||||
#ifndef TYPE_DEFINITIONS_H
|
||||
#define TYPE_DEFINITIONS_H
|
||||
|
||||
|
||||
|
||||
///This file provides some platform/compiler checks for common definitions
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
|
||||
#else
|
||||
#endif //__MINGW32__
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned long int uint64_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned short uint16_t;
|
||||
|
||||
#include <malloc.h>
|
||||
#define memalign(alignment, size) malloc(size);
|
||||
|
||||
#include <string.h> //memcpy
|
||||
|
||||
#define USE_WIN32_THREADING 1
|
||||
|
||||
#else
|
||||
#if defined (__CELLOS_LV2__)
|
||||
///Playstation 3 Cell SDK
|
||||
#include <spu_printf.h>
|
||||
#else
|
||||
//non-windows systems
|
||||
|
||||
#define USE_PTHREADS 1
|
||||
|
||||
|
||||
#endif //__CELLOS_LV2__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h> //for memcpy
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif //TYPE_DEFINITIONS_H
|
||||
#ifndef TYPE_DEFINITIONS_H
|
||||
#define TYPE_DEFINITIONS_H
|
||||
|
||||
|
||||
|
||||
///This file provides some platform/compiler checks for common definitions
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
typedef union
|
||||
{
|
||||
unsigned int u;
|
||||
void *p;
|
||||
} addr64;
|
||||
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
|
||||
#else
|
||||
#endif //__MINGW32__
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned long int uint64_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned short uint16_t;
|
||||
|
||||
#include <malloc.h>
|
||||
#define memalign(alignment, size) malloc(size);
|
||||
|
||||
#include <string.h> //memcpy
|
||||
|
||||
#define USE_WIN32_THREADING 1
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#define spu_printf printf
|
||||
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h> //for memcpy
|
||||
|
||||
#if defined (__CELLOS_LV2__)
|
||||
// Playstation 3 Cell SDK
|
||||
#include <spu_printf.h>
|
||||
|
||||
#else
|
||||
// posix system
|
||||
|
||||
#define USE_PTHREADS
|
||||
|
||||
#ifdef USE_LIBSPE2
|
||||
#include <stdio.h>
|
||||
#define spu_printf printf
|
||||
#define DWORD unsigned int
|
||||
|
||||
typedef union
|
||||
{
|
||||
unsigned long long ull;
|
||||
unsigned int ui[2];
|
||||
void *p;
|
||||
} addr64;
|
||||
|
||||
|
||||
#endif // USE_LIBSPE2
|
||||
|
||||
#endif //__CELLOS_LV2__
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif //TYPE_DEFINITIONS_H
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user