Home | History | Annotate | Download | only in gallivm

Lines Matching refs:src_type

189                 struct lp_type src_type,
196 assert(src_type.length * num_vectors <= ARRAY_SIZE(shuffles));
199 new_length = src_type.length;
232 struct lp_type src_type,
252 dst[i] = lp_build_concat(gallivm, &src[i * size], src_type, size);
372 struct lp_type src_type,
382 assert(!src_type.floating);
384 assert(dst_type.width == src_type.width * 2);
385 assert(dst_type.length * 2 == src_type.length);
387 if(dst_type.sign && src_type.sign) {
389 msb = LLVMBuildAShr(builder, src, lp_build_const_int_vec(gallivm, src_type, src_type.width - 1), "");
393 msb = lp_build_zero(gallivm, src_type);
397 *dst_lo = lp_build_interleave2(gallivm, src_type, src, msb, 0);
398 *dst_hi = lp_build_interleave2(gallivm, src_type, src, msb, 1);
401 *dst_lo = lp_build_interleave2(gallivm, src_type, msb, src, 0);
402 *dst_hi = lp_build_interleave2(gallivm, src_type, msb, src, 1);
425 struct lp_type src_type,
435 assert(!src_type.floating);
437 assert(dst_type.width == src_type.width * 2);
438 assert(dst_type.length * 2 == src_type.length);
440 if(dst_type.sign && src_type.sign) {
443 lp_build_const_int_vec(gallivm, src_type, src_type.width - 1), "");
447 msb = lp_build_zero(gallivm, src_type);
451 if (src_type.length * src_type.width == 256 && util_cpu_caps.has_avx2) {
452 *dst_lo = lp_build_interleave2_half(gallivm, src_type, src, msb, 0);
453 *dst_hi = lp_build_interleave2_half(gallivm, src_type, src, msb, 1);
455 *dst_lo = lp_build_interleave2(gallivm, src_type, src, msb, 0);
456 *dst_hi = lp_build_interleave2(gallivm, src_type, src, msb, 1);
459 *dst_lo = lp_build_interleave2(gallivm, src_type, msb, src, 0);
460 *dst_hi = lp_build_interleave2(gallivm, src_type, msb, src, 1);
480 struct lp_type src_type,
489 assert(src_type.width * src_type.length == dst_type.width * dst_type.length);
492 assert(src_type.length == dst_type.length * num_dsts);
497 while(src_type.width < dst_type.width) {
498 struct lp_type tmp_type = src_type;
504 lp_build_unpack2(gallivm, src_type, tmp_type, dst[i], &dst[2*i + 0],
508 src_type = tmp_type;
535 struct lp_type src_type,
546 assert(!src_type.floating);
548 assert(src_type.width == dst_type.width * 2);
549 assert(src_type.length * 2 == dst_type.length);
553 src_type.width * src_type.length >= 128) {
557 switch(src_type.width) {
602 if (src_type.width * src_type.length == 128) {
614 int num_split = src_type.width * src_type.length / 128;
616 int nlen = 128 / src_type.width;
691 struct lp_type src_type,
700 assert(!src_type.floating);
702 assert(src_type.width == dst_type.width * 2);
703 assert(src_type.length * 2 == dst_type.length);
706 if (src_type.length * src_type.width == 256 &&
708 switch(src_type.width) {
731 return lp_build_pack2(gallivm, src_type, dst_type, lo, hi);
743 struct lp_type src_type,
750 assert(!src_type.floating);
752 assert(src_type.sign == dst_type.sign);
753 assert(src_type.width == dst_type.width * 2);
754 assert(src_type.length * 2 == dst_type.length);
761 src_type.width * src_type.length >= 128 &&
762 src_type.sign &&
763 (src_type.width == 32 || src_type.width == 16))
769 LLVMValueRef dst_max = lp_build_const_int_vec(gallivm, src_type,
771 lp_build_context_init(&bld, gallivm, src_type);
777 return lp_build_pack2(gallivm, src_type, dst_type, lo, hi);
788 struct lp_type src_type,
794 struct lp_type src_type,
802 assert(src_type.width * src_type.length == dst_type.width * dst_type.length);
805 assert(src_type.length * num_srcs == dst_type.length);
815 while(src_type.width > dst_type.width) {
816 struct lp_type tmp_type = src_type;
828 tmp[i] = pack2(gallivm, src_type, tmp_type,
831 src_type = tmp_type;
848 struct lp_type src_type,
861 assert(src_type.floating == dst_type.floating);
867 assert((!src_type.floating && !dst_type.floating) ||
868 src_type.width == dst_type.width);
871 assert(src_type.length * num_srcs == dst_type.length * num_dsts);
873 assert(src_type.length <= LP_MAX_VECTOR_LENGTH);
878 if (src_type.width > dst_type.width) {
886 if (src_type.width * src_type.length == dst_type.width * dst_type.length) {
890 tmp[0] = lp_build_pack(gallivm, src_type, dst_type, TRUE, src, num_srcs);
893 if (src_type.width / dst_type.width > num_srcs) {
899 unsigned size_ratio = (src_type.width * src_type.length) /
901 unsigned new_length = src_type.length / size_ratio;
909 src_type.length = new_length;
910 tmp[0] = lp_build_pack(gallivm, src_type, dst_type, TRUE, tmp, num_srcs);
919 (src_type.length * src_type.width);
924 tmp[i] = lp_build_pack(gallivm, src_type, dst_type, TRUE,
931 else if (src_type.width < dst_type.width) {
939 if (src_type.width * src_type.length == dst_type.width * dst_type.length) {
943 lp_build_unpack(gallivm, src_type, dst_type, src[0], tmp, num_dsts);
949 assert(src_type.length * num_srcs == dst_type.length * num_dsts);
955 for (i = 0; i < src_type.length; ++i) {
961 if (src_type.sign && dst_type.sign) {