It is unnecessary to use fma() if no scaling.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
This commit is contained in:
Yan Wang
2015-07-21 16:20:15 +08:00
parent dac071ed78
commit 132416ebe9
2 changed files with 12 additions and 3 deletions

View File

@@ -53,7 +53,10 @@
__kernel void convertTo(__global const uchar * srcptr, int src_step, int src_offset,
__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols,
WT alpha, WT beta, int rowsPerWI)
#ifndef NO_SCALE
WT alpha, WT beta,
#endif
int rowsPerWI)
{
int x = get_global_id(0);
int y0 = get_global_id(1) * rowsPerWI;
@@ -68,7 +71,11 @@ __kernel void convertTo(__global const uchar * srcptr, int src_step, int src_off
__global const srcT * src = (__global const srcT *)(srcptr + src_index);
__global dstT * dst = (__global dstT *)(dstptr + dst_index);
#ifdef NO_SCALE
dst[0] = convertToDT(src[0]);
#else
dst[0] = convertToDT(fma(convertToWT(src[0]), alpha, beta));
#endif
}
}
}