Home | History | Annotate | Download | only in gallivm

Lines Matching refs:src_type

43  *     src_type.width * src_type.length == dst_type.width * dst_type.length
47 * src_type.length * num_srcs == dst_type.length * num_dsts
95 LLVMTypeRef src_type = LLVMTypeOf(src);
96 unsigned src_length = LLVMGetTypeKind(src_type) == LLVMVectorTypeKind ?
97 LLVMGetVectorSize(src_type) : 1;
240 struct lp_type src_type,
245 LLVMTypeRef int_vec_type = lp_build_int_vec_type(gallivm, src_type);
249 assert(src_type.floating);
250 assert(dst_width <= src_type.width);
251 src_type.sign = FALSE;
253 mantissa = lp_mantissa(src_type);
273 res = LLVMBuildFMul(builder, src, lp_build_const_vec(gallivm, src_type, scale), "");
275 res = LLVMBuildFAdd(builder, res, lp_build_const_vec(gallivm, src_type, bias), "");
278 lp_build_const_int_vec(gallivm, src_type, mask), "");
290 lp_build_context_init(&uf32_bld, gallivm, src_type);
294 lp_build_const_vec(gallivm, src_type, scale), "");
304 * (1 << (src_type.width - 1)), because we need to use signed . In theory it
305 * should be (1 << (src_type.width - 2)), but IEEE 754 rules states
309 * This means we get (src_type.width - 1) correct bits for values near 0.0,
314 unsigned n = MIN2(src_type.width - 1u, dst_width);
323 lp_build_const_vec(gallivm, src_type, scale), "");
334 lp_build_const_int_vec(gallivm, src_type,
344 lp_build_const_int_vec(gallivm, src_type, rshift),
442 struct lp_type src_type,
451 if (src_type.floating == dst_type->floating &&
452 src_type
453 src_type.length == dst_type->length &&
454 src_type.fixed == dst_type->fixed &&
455 src_type.norm == dst_type->norm &&
456 src_type.sign == dst_type->sign)
461 if (src_type.norm == 0 &&
462 src_type.width == 32 &&
463 src_type.fixed == 0 &&
469 ((src_type.floating == 1 && src_type.sign == 1 && dst_type->norm == 1) ||
470 (src_type.floating == 0 && dst_type->floating == 0 &&
471 src_type.sign == dst_type->sign && dst_type->norm == 0))) {
474 if (src_type.length == 4 &&
480 lp_build_conv(gallivm, src_type, *dst_type, src, num_srcs, dst, num_dsts);
485 if (src_type.length == 8 &&
491 lp_build_conv(gallivm, src_type, *dst_type, src, num_srcs, dst, num_dsts);
497 if (src_type.width == dst_type->width) {
498 lp_build_conv(gallivm, src_type, *dst_type, src, num_srcs, dst, num_dsts);
509 if (src_type.width == 2 * dst_type->width &&
510 src_type.length == dst_type->length &&
518 lp_build_conv(gallivm, src_type, *dst_type, &src[i*ratio], ratio, &dst[i], 1);
534 struct lp_type src_type,
546 assert(src_type.length * num_srcs == dst_type.length * num_dsts);
548 assert(src_type.length <= LP_MAX_VECTOR_LENGTH);
553 tmp_type = src_type;
555 assert(lp_check_value(src_type, src[i]));
567 if (src_type.norm == 0 &&
568 src_type.width == 32 &&
569 src_type.length == 4 &&
570 src_type.fixed == 0 &&
576 ((src_type.floating == 1 && src_type.sign == 1 && dst_type.norm == 1) ||
577 (src_type.floating == 0 && dst_type.floating == 0 &&
578 src_type.sign == dst_type.sign && dst_type.norm == 0)) &&
591 lp_build_context_init(&bld, gallivm, src_type);
604 const_scale = lp_build_const_vec(gallivm, src_type, lp_const_scale(dst_type));
609 if (src_type.floating) {
646 const_max = lp_build_const_int_vec(gallivm, src_type, 255);
678 else if (src_type.norm == 0 &&
679 src_type.width == 32 &&
680 src_type.length == 8 &&
681 src_type.fixed == 0 &&
687 ((src_type.floating == 1 && src_type.sign == 1 && dst_type.norm == 1) ||
688 (src_type.floating == 0 && dst_type.floating == 0 &&
689 src_type.sign == dst_type.sign && dst_type.norm == 0)) &&
702 lp_build_context_init(&bld, gallivm, src_type);
715 const_scale = lp_build_const_vec(gallivm, src_type, lp_const_scale(dst_type));
723 if (src_type.floating) {
739 const_max = lp_build_const_int_vec(gallivm, src_type, 255);
767 assert(src_type.floating && src_type.width == 32);
777 else if (src_type.floating && src_type.width == 16)
789 if(memcmp(&src_type, &dst_type, sizeof src_type) != 0) {
791 double src_min = lp_const_min(src_type);
793 double src_max = lp_const_max(src_type);
803 thres = lp_build_const_vec(gallivm, src_type, dst_min);
812 thres = lp_build_const_vec(gallivm, src_type, dst_max);
880 unsigned src_shift = lp_const_shift(src_type);
882 unsigned src_offset = lp_const_offset(src_type);
889 if (dst_offset > src_offset && src_type.width > dst_type.width && src_shift > 0) {
933 if(src_type.floating) {
936 else if(!src_type.floating && dst_type.floating) {
937 if(!src_type.fixed && !src_type.sign && src_type.norm) {
940 src_type.width,
947 double src_scale = lp_const_scale(src_type);
974 if (0 && !src_type.fixed && src_type.norm && src_type.sign) {
986 unsigned src_shift = lp_const_shift(src_type);
988 unsigned src_offset = lp_const_offset(src_type);
1041 struct lp_type src_type,
1048 assert(src_type.length * num_srcs == dst_type.length * num_dsts);
1056 src_type.floating = FALSE;
1057 src_type.fixed = FALSE;
1058 src_type.sign = TRUE;
1059 src_type.norm = FALSE;
1070 lp_build_resize(gallivm, src_type, dst_type, src, num_srcs, dst, num_dsts);