HIP: Heterogenous-computing Interface for Portability
Classes | Macros | Functions | Variables
hip_vector_types.h File Reference

Defines the different newt vector types for HIP runtime. More...

#include "hip/hcc_detail/host_defines.h"

Go to the source code of this file.

Classes

struct  uchar1
 
struct  uchar2
 
struct  uchar3
 
struct  uchar4
 
struct  char1
 
struct  char2
 
struct  char3
 
struct  char4
 
struct  ushort1
 
struct  ushort2
 
struct  ushort3
 
struct  ushort4
 
struct  short1
 
struct  short2
 
struct  short3
 
struct  short4
 
struct  uint1
 
struct  uint2
 
struct  uint3
 
struct  uint4
 
struct  int1
 
struct  int2
 
struct  int3
 
struct  int4
 
struct  float1
 
struct  float2
 
struct  float3
 
struct  float4
 
struct  double1
 
struct  double2
 
struct  double3
 
struct  double4
 
struct  ulong1
 
struct  ulong2
 
struct  ulong3
 
struct  ulong4
 
struct  long1
 
struct  long2
 
struct  long3
 
struct  long4
 
struct  ulonglong1
 
struct  ulonglong2
 
struct  ulonglong3
 
struct  ulonglong4
 
struct  longlong1
 
struct  longlong2
 
struct  longlong3
 
struct  longlong4
 

Macros

#define MAKE_DEFAULT_CONSTRUCTOR_ONE_COMPONENT(type)
 
#define MAKE_DEFAULT_CONSTRUCTOR_TWO_COMPONENT(type)
 
#define MAKE_DEFAULT_CONSTRUCTOR_THREE_COMPONENT(type)
 
#define MAKE_DEFAULT_CONSTRUCTOR_FOUR_COMPONENT(type)
 
#define MAKE_COMPONENT_CONSTRUCTOR_ONE_COMPONENT(type, type1)   __device__ __host__ type(type1 val) : x(val) {} \
 
#define MAKE_COMPONENT_CONSTRUCTOR_TWO_COMPONENT(type, type1)
 
#define MAKE_COMPONENT_CONSTRUCTOR_THREE_COMPONENT(type, type1)
 
#define MAKE_COMPONENT_CONSTRUCTOR_FOUR_COMPONENT(type, type1)
 
#define DECLOP_MAKE_ONE_COMPONENT(comp, type)
 
#define DECLOP_MAKE_TWO_COMPONENT(comp, type)
 
#define DECLOP_MAKE_THREE_COMPONENT(comp, type)
 
#define DECLOP_MAKE_FOUR_COMPONENT(comp, type)
 

Functions

struct uchar1 __attribute__ ((aligned(1)))
 
struct uchar2 __attribute__ ((aligned(2)))
 
struct uchar4 __attribute__ ((aligned(4)))
 
struct ushort4 __attribute__ ((aligned(8)))
 
struct uint4 __attribute__ ((aligned(16)))
 
struct double4 __attribute__ ((aligned(32)))
 
 DECLOP_MAKE_ONE_COMPONENT (unsigned char, uchar1)
 
 DECLOP_MAKE_TWO_COMPONENT (unsigned char, uchar2)
 
 DECLOP_MAKE_THREE_COMPONENT (unsigned char, uchar3)
 
 DECLOP_MAKE_FOUR_COMPONENT (unsigned char, uchar4)
 
 DECLOP_MAKE_ONE_COMPONENT (signed char, char1)
 
 DECLOP_MAKE_TWO_COMPONENT (signed char, char2)
 
 DECLOP_MAKE_THREE_COMPONENT (signed char, char3)
 
 DECLOP_MAKE_FOUR_COMPONENT (signed char, char4)
 
 DECLOP_MAKE_ONE_COMPONENT (unsigned short, ushort1)
 
 DECLOP_MAKE_TWO_COMPONENT (unsigned short, ushort2)
 
 DECLOP_MAKE_THREE_COMPONENT (unsigned short, ushort3)
 
 DECLOP_MAKE_FOUR_COMPONENT (unsigned short, ushort4)
 
 DECLOP_MAKE_ONE_COMPONENT (signed short, short1)
 
 DECLOP_MAKE_TWO_COMPONENT (signed short, short2)
 
 DECLOP_MAKE_THREE_COMPONENT (signed short, short3)
 
 DECLOP_MAKE_FOUR_COMPONENT (signed short, short4)
 
 DECLOP_MAKE_ONE_COMPONENT (unsigned int, uint1)
 
 DECLOP_MAKE_TWO_COMPONENT (unsigned int, uint2)
 
 DECLOP_MAKE_THREE_COMPONENT (unsigned int, uint3)
 
 DECLOP_MAKE_FOUR_COMPONENT (unsigned int, uint4)
 
 DECLOP_MAKE_ONE_COMPONENT (signed int, int1)
 
 DECLOP_MAKE_TWO_COMPONENT (signed int, int2)
 
 DECLOP_MAKE_THREE_COMPONENT (signed int, int3)
 
 DECLOP_MAKE_FOUR_COMPONENT (signed int, int4)
 
 DECLOP_MAKE_ONE_COMPONENT (float, float1)
 
 DECLOP_MAKE_TWO_COMPONENT (float, float2)
 
 DECLOP_MAKE_THREE_COMPONENT (float, float3)
 
 DECLOP_MAKE_FOUR_COMPONENT (float, float4)
 
 DECLOP_MAKE_ONE_COMPONENT (double, double1)
 
 DECLOP_MAKE_TWO_COMPONENT (double, double2)
 
 DECLOP_MAKE_THREE_COMPONENT (double, double3)
 
 DECLOP_MAKE_FOUR_COMPONENT (double, double4)
 
 DECLOP_MAKE_ONE_COMPONENT (unsigned long, ulong1)
 
 DECLOP_MAKE_TWO_COMPONENT (unsigned long, ulong2)
 
 DECLOP_MAKE_THREE_COMPONENT (unsigned long, ulong3)
 
 DECLOP_MAKE_FOUR_COMPONENT (unsigned long, ulong4)
 
 DECLOP_MAKE_ONE_COMPONENT (signed long, long1)
 
 DECLOP_MAKE_TWO_COMPONENT (signed long, long2)
 
 DECLOP_MAKE_THREE_COMPONENT (signed long, long3)
 
 DECLOP_MAKE_FOUR_COMPONENT (signed long, long4)
 
 DECLOP_MAKE_ONE_COMPONENT (unsigned long, ulonglong1)
 
 DECLOP_MAKE_TWO_COMPONENT (unsigned long, ulonglong2)
 
 DECLOP_MAKE_THREE_COMPONENT (unsigned long, ulonglong3)
 
 DECLOP_MAKE_FOUR_COMPONENT (unsigned long, ulonglong4)
 
 DECLOP_MAKE_ONE_COMPONENT (signed long, longlong1)
 
 DECLOP_MAKE_TWO_COMPONENT (signed long, longlong2)
 
 DECLOP_MAKE_THREE_COMPONENT (signed long, longlong3)
 
 DECLOP_MAKE_FOUR_COMPONENT (signed long, longlong4)
 

Variables

unsigned char x
 
union {
   struct {
      unsigned char   x
 
      unsigned char   y
 
   } 
 
   unsigned short   a
 
}; 
 
struct uchar3 __attribute__
 
union {
   struct {
      unsigned char   x
 
      unsigned char   y
 
      unsigned char   z
 
      unsigned char   w
 
   } 
 
   unsigned int   a
 
}; 
 
union {
   struct {
      signed char   x
 
      signed char   y
 
   } 
 
   unsigned short   a
 
}; 
 
union {
   struct {
      signed char   x
 
      signed char   y
 
      signed char   z
 
      signed char   w
 
   } 
 
   unsigned int   a
 
}; 
 
union {
   struct {
      unsigned short   x
 
      unsigned short   y
 
   } 
 
   unsigned int   a
 
}; 
 
union {
   struct {
      unsigned short   x
 
      unsigned short   y
 
      unsigned short   z
 
      unsigned short   w
 
   } 
 
   unsigned int   a
 
   unsigned int   b
 
}; 
 
union {
   struct {
      signed short   x
 
      signed short   y
 
   } 
 
   unsigned int   a
 
}; 
 
union {
   struct {
      signed short   x
 
      signed short   y
 
      signed short   z
 
      signed short   w
 
   } 
 
   unsigned int   a
 
   unsigned int   b
 
}; 
 

Detailed Description

Defines the different newt vector types for HIP runtime.

Macro Definition Documentation

#define DECLOP_MAKE_FOUR_COMPONENT (   comp,
  type 
)
Value:
__device__ __host__ static inline struct type make_##type(comp x, comp y, comp z, comp w) { \
struct type ret; \
ret.x = x; \
ret.y = y; \
ret.z = z; \
ret.w = w; \
return ret; \
}
#define __host__
Definition: host_defines.h:41
#define DECLOP_MAKE_ONE_COMPONENT (   comp,
  type 
)
Value:
__device__ __host__ static inline struct type make_##type(comp x) { \
struct type ret; \
ret.x = x; \
return ret; \
}
#define __host__
Definition: host_defines.h:41
#define DECLOP_MAKE_THREE_COMPONENT (   comp,
  type 
)
Value:
__device__ __host__ static inline struct type make_##type(comp x, comp y, comp z) { \
struct type ret; \
ret.x = x; \
ret.y = y; \
ret.z = z; \
return ret; \
}
#define __host__
Definition: host_defines.h:41
#define DECLOP_MAKE_TWO_COMPONENT (   comp,
  type 
)
Value:
__device__ __host__ static inline struct type make_##type(comp x, comp y) { \
struct type ret; \
ret.x = x; \
ret.y = y; \
return ret; \
}
#define __host__
Definition: host_defines.h:41
#define MAKE_COMPONENT_CONSTRUCTOR_FOUR_COMPONENT (   type,
  type1 
)
Value:
__device__ __host__ type(type1 val) : x(val), y(val), z(val), w(val) {} \
__device__ __host__ type(type1 val1, type1 val2, type1 val3, type1 val4) : x(val1), y(val2), z(val3), w(val4) {} \
#define __host__
Definition: host_defines.h:41
#define MAKE_COMPONENT_CONSTRUCTOR_THREE_COMPONENT (   type,
  type1 
)
Value:
__device__ __host__ type(type1 val) : x(val), y(val), z(val) {} \
__device__ __host__ type(type1 val1, type1 val2, type1 val3) : x(val1), y(val2), z(val3) {} \
#define __host__
Definition: host_defines.h:41
#define MAKE_COMPONENT_CONSTRUCTOR_TWO_COMPONENT (   type,
  type1 
)
Value:
__device__ __host__ type(type1 val) : x(val), y(val) {} \
__device__ __host__ type(type1 val1, type1 val2) : x(val1), y(val2) {} \
#define __host__
Definition: host_defines.h:41
#define MAKE_DEFAULT_CONSTRUCTOR_FOUR_COMPONENT (   type)
Value:
__device__ __host__ type() {} \
__device__ __host__ type(const type& val) : x(val.x), y(val.y), z(val.z), w(val.w) { } \
__device__ __host__ ~type() {}
#define __host__
Definition: host_defines.h:41
#define MAKE_DEFAULT_CONSTRUCTOR_ONE_COMPONENT (   type)
Value:
__device__ __host__ type() {} \
__device__ __host__ type(const type& val) : x(val.x) { } \
__device__ __host__ ~type() {}
#define __host__
Definition: host_defines.h:41
#define MAKE_DEFAULT_CONSTRUCTOR_THREE_COMPONENT (   type)
Value:
__device__ __host__ type() {} \
__device__ __host__ type(const type& val) : x(val.x), y(val.y), z(val.z) { } \
__device__ __host__ ~type() {}
#define __host__
Definition: host_defines.h:41
#define MAKE_DEFAULT_CONSTRUCTOR_TWO_COMPONENT (   type)
Value:
__device__ __host__ type() {} \
__device__ __host__ type(const type& val) : x(val.x), y(val.y) { } \
__device__ __host__ ~type() {}
#define __host__
Definition: host_defines.h:41