Fix float2int rounding functions
Change-Id: I67943859a6344c5eec0eaa23418c9b802ef72468
Este commit está contenido en:
@@ -23,6 +23,27 @@ THE SOFTWARE.
|
||||
#include <hc_math.hpp>
|
||||
#include "device_util.h"
|
||||
|
||||
struct holder64Bit{
|
||||
union{
|
||||
double d;
|
||||
unsigned long int uli;
|
||||
signed long int sli;
|
||||
signed int si[2];
|
||||
unsigned int ui[2];
|
||||
};
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
struct holder32Bit {
|
||||
union {
|
||||
float f;
|
||||
unsigned int ui;
|
||||
signed int si;
|
||||
};
|
||||
} __attribute__((aligned(4)));
|
||||
|
||||
__device__ struct holder64Bit hold64;
|
||||
__device__ struct holder32Bit hold32;
|
||||
|
||||
__device__ float __double2float_rd(double x)
|
||||
{
|
||||
return (double)x;
|
||||
|
||||
Referencia en una nueva incidencia
Block a user