#include "translate/translate.h"
#include "util/u_memory.h"
#include "util/u_format.h"
+#include "util/u_half.h"
#include "util/u_cpu_detect.h"
#include "rtasm/rtasm_cpu.h"
unsigned char* byte_buffer;
float* float_buffer;
double* double_buffer;
+ uint16_t *half_buffer;
unsigned * elts;
unsigned count = 4;
unsigned i, j, k;
byte_buffer = align_malloc(buffer_size, 4096);
float_buffer = align_malloc(buffer_size, 4096);
double_buffer = align_malloc(buffer_size, 4096);
+ half_buffer = align_malloc(buffer_size, 4096);
elts = align_malloc(count * sizeof *elts, 4096);
for (i = 0; i < buffer_size / sizeof(double); ++i)
double_buffer[i] = rand_double();
+ for (i = 0; i < buffer_size / sizeof(double); ++i)
+ half_buffer[i] = util_float_to_half((float) rand_double());
+
for (i = 0; i < count; ++i)
elts[i] = i;
buffer[0] = (unsigned char*)float_buffer;
else if(input_is_float && input_format_desc->channel[0].size == 64)
buffer[0] = (unsigned char*)double_buffer;
+ else if(input_is_float && input_format_desc->channel[0].size == 16)
+ buffer[0] = (unsigned char*)half_buffer;
else if(input_is_float)
abort();
else