libflame revision_anchor
Functions
bl1_copymr.c File Reference

(r)

Functions

void bl1_scopymr (uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_dcopymr (uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_ccopymr (uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_zcopymr (uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 
void bl1_sscopymr (uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_sdcopymr (uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_dscopymr (uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_sccopymr (uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_cscopymr (uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_szcopymr (uplo1_t uplo, int m, int n, float *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 
void bl1_zscopymr (uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_ddcopymr (uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_dccopymr (uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_cdcopymr (uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_dzcopymr (uplo1_t uplo, int m, int n, double *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 
void bl1_zdcopymr (uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_cccopymr (uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_czcopymr (uplo1_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 
void bl1_zccopymr (uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_zzcopymr (uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 

Function Documentation

◆ bl1_cccopymr()

void bl1_cccopymr ( uplo1_t  uplo,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
1051{
1054 int lda, inca;
1055 int ldb, incb;
1056 int n_iter;
1057 int n_elem_max;
1058 int n_elem;
1059 int j;
1060
1061 // Return early if possible.
1062 if ( bl1_zero_dim2( m, n ) ) return;
1063
1064 // We initialize for column-major.
1065 n_iter = n;
1066 n_elem_max = m;
1067 lda = a_cs;
1068 inca = a_rs;
1069 ldb = b_cs;
1070 incb = b_rs;
1071
1072 // An optimization: if B is row-major, then let's access the matrix
1073 // by rows instead of by columns for increased spatial locality.
1074 if ( bl1_is_row_storage( b_rs, b_cs ) )
1075 {
1079 bl1_toggle_uplo( uplo );
1080 }
1081
1082
1083 if ( bl1_is_upper( uplo ) )
1084 {
1085 for ( j = 0; j < n_iter; j++ )
1086 {
1087 n_elem = bl1_min( j + 1, n_elem_max );
1088 a_begin = a + j*lda;
1089 b_begin = b + j*ldb;
1090
1092 n_elem,
1093 a_begin, inca,
1094 b_begin, incb );
1095 }
1096 }
1097 else // if ( bl1_is_lower( uplo ) )
1098 {
1099 for ( j = 0; j < n_iter; j++ )
1100 {
1101 n_elem = bl1_max( 0, n_elem_max - j );
1102 a_begin = a + j*lda + j*inca;
1103 b_begin = b + j*ldb + j*incb;
1104
1105 if ( n_elem <= 0 ) break;
1106
1108 n_elem,
1109 a_begin, inca,
1110 b_begin, incb );
1111 }
1112 }
1113}
int i
Definition bl1_axmyv2.c:145
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition bl1_copyv.c:49
int bl1_is_row_storage(int rs, int cs)
Definition bl1_is.c:95
int bl1_is_upper(uplo1_t uplo)
Definition bl1_is.c:54
int bl1_zero_dim2(int m, int n)
Definition bl1_is.c:118
@ BLIS1_NO_CONJUGATE
Definition blis_type_defs.h:81
Definition blis_type_defs.h:133

References bl1_ccopyv(), bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

◆ bl1_ccopymr()

void bl1_ccopymr ( uplo1_t  uplo,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
140{
143 int lda, inca;
144 int ldb, incb;
145 int n_iter;
146 int n_elem_max;
147 int n_elem;
148 int j;
149
150 // Return early if possible.
151 if ( bl1_zero_dim2( m, n ) ) return;
152
153 // We initialize for column-major.
154 n_iter = n;
155 n_elem_max = m;
156 lda = a_cs;
157 inca = a_rs;
158 ldb = b_cs;
159 incb = b_rs;
160
161 // An optimization: if A and B are both row-major, then let's access the
162 // matrices by rows instead of by columns for increased spatial locality.
164 {
168 bl1_toggle_uplo( uplo );
169 }
170
171
172 if ( bl1_is_upper( uplo ) )
173 {
174 for ( j = 0; j < n_iter; j++ )
175 {
176 n_elem = bl1_min( j + 1, n_elem_max );
177 a_begin = a + j*lda;
178 b_begin = b + j*ldb;
179
181 a_begin, inca,
182 b_begin, incb );
183 }
184 }
185 else // if ( bl1_is_lower( uplo ) )
186 {
187 for ( j = 0; j < n_iter; j++ )
188 {
189 n_elem = bl1_max( 0, n_elem_max - j );
190 a_begin = a + j*lda + j*inca;
191 b_begin = b + j*ldb + j*incb;
192
193 if ( n_elem <= 0 ) break;
194
196 a_begin, inca,
197 b_begin, incb );
198 }
199 }
200}
void bl1_ccopy(int m, scomplex *x, int incx, scomplex *y, int incy)
Definition bl1_copy.c:39

References bl1_ccopy(), bl1_is_row_storage(), bl1_is_upper(), and bl1_zero_dim2().

Referenced by bl1_ccreate_contigmr(), bl1_cfree_saved_contigmr(), and FLA_Copyr_external().

◆ bl1_cdcopymr()

void bl1_cdcopymr ( uplo1_t  uplo,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
double b,
int  b_rs,
int  b_cs 
)
855{
857 double* b_begin;
858 int lda, inca;
859 int ldb, incb;
860 int n_iter;
861 int n_elem_max;
862 int n_elem;
863 int j;
864
865 // Return early if possible.
866 if ( bl1_zero_dim2( m, n ) ) return;
867
868 // We initialize for column-major.
869 n_iter = n;
870 n_elem_max = m;
871 lda = a_cs;
872 inca = a_rs;
873 ldb = b_cs;
874 incb = b_rs;
875
876 // An optimization: if B is row-major, then let's access the matrix
877 // by rows instead of by columns for increased spatial locality.
878 if ( bl1_is_row_storage( b_rs, b_cs ) )
879 {
883 bl1_toggle_uplo( uplo );
884 }
885
886
887 if ( bl1_is_upper( uplo ) )
888 {
889 for ( j = 0; j < n_iter; j++ )
890 {
891 n_elem = bl1_min( j + 1, n_elem_max );
892 a_begin = a + j*lda;
893 b_begin = b + j*ldb;
894
896 n_elem,
897 a_begin, inca,
898 b_begin, incb );
899 }
900 }
901 else // if ( bl1_is_lower( uplo ) )
902 {
903 for ( j = 0; j < n_iter; j++ )
904 {
905 n_elem = bl1_max( 0, n_elem_max - j );
906 a_begin = a + j*lda + j*inca;
907 b_begin = b + j*ldb + j*incb;
908
909 if ( n_elem <= 0 ) break;
910
912 n_elem,
913 a_begin, inca,
914 b_begin, incb );
915 }
916 }
917}
void bl1_cdcopyv(conj1_t conj, int m, scomplex *x, int incx, double *y, int incy)
Definition bl1_copyv.c:236

References bl1_cdcopyv(), bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_cscopymr()

void bl1_cscopymr ( uplo1_t  uplo,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
float b,
int  b_rs,
int  b_cs 
)
529{
531 float* b_begin;
532 int lda, inca;
533 int ldb, incb;
534 int n_iter;
535 int n_elem_max;
536 int n_elem;
537 int j;
538
539 // Return early if possible.
540 if ( bl1_zero_dim2( m, n ) ) return;
541
542 // We initialize for column-major.
543 n_iter = n;
544 n_elem_max = m;
545 lda = a_cs;
546 inca = a_rs;
547 ldb = b_cs;
548 incb = b_rs;
549
550 // An optimization: if B is row-major, then let's access the matrix
551 // by rows instead of by columns for increased spatial locality.
552 if ( bl1_is_row_storage( b_rs, b_cs ) )
553 {
557 bl1_toggle_uplo( uplo );
558 }
559
560
561 if ( bl1_is_upper( uplo ) )
562 {
563 for ( j = 0; j < n_iter; j++ )
564 {
565 n_elem = bl1_min( j + 1, n_elem_max );
566 a_begin = a + j*lda;
567 b_begin = b + j*ldb;
568
570 n_elem,
571 a_begin, inca,
572 b_begin, incb );
573 }
574 }
575 else // if ( bl1_is_lower( uplo ) )
576 {
577 for ( j = 0; j < n_iter; j++ )
578 {
579 n_elem = bl1_max( 0, n_elem_max - j );
580 a_begin = a + j*lda + j*inca;
581 b_begin = b + j*ldb + j*incb;
582
583 if ( n_elem <= 0 ) break;
584
586 n_elem,
587 a_begin, inca,
588 b_begin, incb );
589 }
590 }
591}
void bl1_cscopyv(conj1_t conj, int m, scomplex *x, int incx, float *y, int incy)
Definition bl1_copyv.c:146

References bl1_cscopyv(), bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_czcopymr()

void bl1_czcopymr ( uplo1_t  uplo,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
1117{
1120 int lda, inca;
1121 int ldb, incb;
1122 int n_iter;
1123 int n_elem_max;
1124 int n_elem;
1125 int j;
1126
1127 // Return early if possible.
1128 if ( bl1_zero_dim2( m, n ) ) return;
1129
1130 // We initialize for column-major.
1131 n_iter = n;
1132 n_elem_max = m;
1133 lda = a_cs;
1134 inca = a_rs;
1135 ldb = b_cs;
1136 incb = b_rs;
1137
1138 // An optimization: if B is row-major, then let's access the matrix
1139 // by rows instead of by columns for increased spatial locality.
1140 if ( bl1_is_row_storage( b_rs, b_cs ) )
1141 {
1145 bl1_toggle_uplo( uplo );
1146 }
1147
1148
1149 if ( bl1_is_upper( uplo ) )
1150 {
1151 for ( j = 0; j < n_iter; j++ )
1152 {
1153 n_elem = bl1_min( j + 1, n_elem_max );
1154 a_begin = a + j*lda;
1155 b_begin = b + j*ldb;
1156
1158 n_elem,
1159 a_begin, inca,
1160 b_begin, incb );
1161 }
1162 }
1163 else // if ( bl1_is_lower( uplo ) )
1164 {
1165 for ( j = 0; j < n_iter; j++ )
1166 {
1167 n_elem = bl1_max( 0, n_elem_max - j );
1168 a_begin = a + j*lda + j*inca;
1169 b_begin = b + j*ldb + j*incb;
1170
1171 if ( n_elem <= 0 ) break;
1172
1174 n_elem,
1175 a_begin, inca,
1176 b_begin, incb );
1177 }
1178 }
1179}
void bl1_czcopyv(conj1_t conj, int m, scomplex *x, int incx, dcomplex *y, int incy)
Definition bl1_copyv.c:304
Definition blis_type_defs.h:138

References bl1_czcopyv(), bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_dccopymr()

void bl1_dccopymr ( uplo1_t  uplo,
int  m,
int  n,
double a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
791{
792 double* a_begin;
794 int lda, inca;
795 int ldb, incb;
796 int n_iter;
797 int n_elem_max;
798 int n_elem;
799 int j;
800
801 // Return early if possible.
802 if ( bl1_zero_dim2( m, n ) ) return;
803
804 // We initialize for column-major.
805 n_iter = n;
806 n_elem_max = m;
807 lda = a_cs;
808 inca = a_rs;
809 ldb = b_cs;
810 incb = b_rs;
811
812 // An optimization: if B is row-major, then let's access the matrix
813 // by rows instead of by columns for increased spatial locality.
814 if ( bl1_is_row_storage( b_rs, b_cs ) )
815 {
819 bl1_toggle_uplo( uplo );
820 }
821
822
823 if ( bl1_is_upper( uplo ) )
824 {
825 for ( j = 0; j < n_iter; j++ )
826 {
827 n_elem = bl1_min( j + 1, n_elem_max );
828 a_begin = a + j*lda;
829 b_begin = b + j*ldb;
830
832 n_elem,
833 a_begin, inca,
834 b_begin, incb );
835 }
836 }
837 else // if ( bl1_is_lower( uplo ) )
838 {
839 for ( j = 0; j < n_iter; j++ )
840 {
841 n_elem = bl1_max( 0, n_elem_max - j );
842 a_begin = a + j*lda + j*inca;
843 b_begin = b + j*ldb + j*incb;
844
845 if ( n_elem <= 0 ) break;
846
848 n_elem,
849 a_begin, inca,
850 b_begin, incb );
851 }
852 }
853}
void bl1_dccopyv(conj1_t conj, int m, double *x, int incx, scomplex *y, int incy)
Definition bl1_copyv.c:214

References bl1_dccopyv(), bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_dcopymr()

void bl1_dcopymr ( uplo1_t  uplo,
int  m,
int  n,
double a,
int  a_rs,
int  a_cs,
double b,
int  b_rs,
int  b_cs 
)
77{
78 double* a_begin;
79 double* b_begin;
80 int lda, inca;
81 int ldb, incb;
82 int n_iter;
83 int n_elem_max;
84 int n_elem;
85 int j;
86
87 // Return early if possible.
88 if ( bl1_zero_dim2( m, n ) ) return;
89
90 // We initialize for column-major.
91 n_iter = n;
92 n_elem_max = m;
93 lda = a_cs;
94 inca = a_rs;
95 ldb = b_cs;
96 incb = b_rs;
97
98 // An optimization: if A and B are both row-major, then let's access the
99 // matrices by rows instead of by columns for increased spatial locality.
101 {
105 bl1_toggle_uplo( uplo );
106 }
107
108
109 if ( bl1_is_upper( uplo ) )
110 {
111 for ( j = 0; j < n_iter; j++ )
112 {
113 n_elem = bl1_min( j + 1, n_elem_max );
114 a_begin = a + j*lda;
115 b_begin = b + j*ldb;
116
118 a_begin, inca,
119 b_begin, incb );
120 }
121 }
122 else // if ( bl1_is_lower( uplo ) )
123 {
124 for ( j = 0; j < n_iter; j++ )
125 {
126 n_elem = bl1_max( 0, n_elem_max - j );
127 a_begin = a + j*lda + j*inca;
128 b_begin = b + j*ldb + j*incb;
129
130 if ( n_elem <= 0 ) break;
131
133 a_begin, inca,
134 b_begin, incb );
135 }
136 }
137}
void bl1_dcopy(int m, double *x, int incx, double *y, int incy)
Definition bl1_copy.c:26

References bl1_dcopy(), bl1_is_row_storage(), bl1_is_upper(), and bl1_zero_dim2().

Referenced by bl1_dcreate_contigmr(), bl1_dfree_saved_contigmr(), and FLA_Copyr_external().

◆ bl1_ddcopymr()

void bl1_ddcopymr ( uplo1_t  uplo,
int  m,
int  n,
double a,
int  a_rs,
int  a_cs,
double b,
int  b_rs,
int  b_cs 
)
725{
726 double* a_begin;
727 double* b_begin;
728 int lda, inca;
729 int ldb, incb;
730 int n_iter;
731 int n_elem_max;
732 int n_elem;
733 int j;
734
735 // Return early if possible.
736 if ( bl1_zero_dim2( m, n ) ) return;
737
738 // We initialize for column-major.
739 n_iter = n;
740 n_elem_max = m;
741 lda = a_cs;
742 inca = a_rs;
743 ldb = b_cs;
744 incb = b_rs;
745
746 // An optimization: if B is row-major, then let's access the matrix
747 // by rows instead of by columns for increased spatial locality.
748 if ( bl1_is_row_storage( b_rs, b_cs ) )
749 {
753 bl1_toggle_uplo( uplo );
754 }
755
756
757 if ( bl1_is_upper( uplo ) )
758 {
759 for ( j = 0; j < n_iter; j++ )
760 {
761 n_elem = bl1_min( j + 1, n_elem_max );
762 a_begin = a + j*lda;
763 b_begin = b + j*ldb;
764
766 n_elem,
767 a_begin, inca,
768 b_begin, incb );
769 }
770 }
771 else // if ( bl1_is_lower( uplo ) )
772 {
773 for ( j = 0; j < n_iter; j++ )
774 {
775 n_elem = bl1_max( 0, n_elem_max - j );
776 a_begin = a + j*lda + j*inca;
777 b_begin = b + j*ldb + j*incb;
778
779 if ( n_elem <= 0 ) break;
780
782 n_elem,
783 a_begin, inca,
784 b_begin, incb );
785 }
786 }
787}
void bl1_dcopyv(conj1_t conj, int m, double *x, int incx, double *y, int incy)
Definition bl1_copyv.c:42

References bl1_dcopyv(), bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

◆ bl1_dscopymr()

void bl1_dscopymr ( uplo1_t  uplo,
int  m,
int  n,
double a,
int  a_rs,
int  a_cs,
float b,
int  b_rs,
int  b_cs 
)
399{
400 double* a_begin;
401 float* b_begin;
402 int lda, inca;
403 int ldb, incb;
404 int n_iter;
405 int n_elem_max;
406 int n_elem;
407 int j;
408
409 // Return early if possible.
410 if ( bl1_zero_dim2( m, n ) ) return;
411
412 // We initialize for column-major.
413 n_iter = n;
414 n_elem_max = m;
415 lda = a_cs;
416 inca = a_rs;
417 ldb = b_cs;
418 incb = b_rs;
419
420 // An optimization: if B is row-major, then let's access the matrix
421 // by rows instead of by columns for increased spatial locality.
422 if ( bl1_is_row_storage( b_rs, b_cs ) )
423 {
427 bl1_toggle_uplo( uplo );
428 }
429
430
431 if ( bl1_is_upper( uplo ) )
432 {
433 for ( j = 0; j < n_iter; j++ )
434 {
435 n_elem = bl1_min( j + 1, n_elem_max );
436 a_begin = a + j*lda;
437 b_begin = b + j*ldb;
438
440 n_elem,
441 a_begin, inca,
442 b_begin, incb );
443 }
444 }
445 else // if ( bl1_is_lower( uplo ) )
446 {
447 for ( j = 0; j < n_iter; j++ )
448 {
449 n_elem = bl1_max( 0, n_elem_max - j );
450 a_begin = a + j*lda + j*inca;
451 b_begin = b + j*ldb + j*incb;
452
453 if ( n_elem <= 0 ) break;
454
456 n_elem,
457 a_begin, inca,
458 b_begin, incb );
459 }
460 }
461}
void bl1_dscopyv(conj1_t conj, int m, double *x, int incx, float *y, int incy)
Definition bl1_copyv.c:101

References bl1_dscopyv(), bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_dzcopymr()

void bl1_dzcopymr ( uplo1_t  uplo,
int  m,
int  n,
double a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
921{
922 double* a_begin;
924 int lda, inca;
925 int ldb, incb;
926 int n_iter;
927 int n_elem_max;
928 int n_elem;
929 int j;
930
931 // Return early if possible.
932 if ( bl1_zero_dim2( m, n ) ) return;
933
934 // We initialize for column-major.
935 n_iter = n;
936 n_elem_max = m;
937 lda = a_cs;
938 inca = a_rs;
939 ldb = b_cs;
940 incb = b_rs;
941
942 // An optimization: if B is row-major, then let's access the matrix
943 // by rows instead of by columns for increased spatial locality.
944 if ( bl1_is_row_storage( b_rs, b_cs ) )
945 {
949 bl1_toggle_uplo( uplo );
950 }
951
952
953 if ( bl1_is_upper( uplo ) )
954 {
955 for ( j = 0; j < n_iter; j++ )
956 {
957 n_elem = bl1_min( j + 1, n_elem_max );
958 a_begin = a + j*lda;
959 b_begin = b + j*ldb;
960
962 n_elem,
963 a_begin, inca,
964 b_begin, incb );
965 }
966 }
967 else // if ( bl1_is_lower( uplo ) )
968 {
969 for ( j = 0; j < n_iter; j++ )
970 {
971 n_elem = bl1_max( 0, n_elem_max - j );
972 a_begin = a + j*lda + j*inca;
973 b_begin = b + j*ldb + j*incb;
974
975 if ( n_elem <= 0 ) break;
976
978 n_elem,
979 a_begin, inca,
980 b_begin, incb );
981 }
982 }
983}
void bl1_dzcopyv(conj1_t conj, int m, double *x, int incx, dcomplex *y, int incy)
Definition bl1_copyv.c:259

References bl1_dzcopyv(), bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_sccopymr()

void bl1_sccopymr ( uplo1_t  uplo,
int  m,
int  n,
float a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
465{
466 float* a_begin;
468 int lda, inca;
469 int ldb, incb;
470 int n_iter;
471 int n_elem_max;
472 int n_elem;
473 int j;
474
475 // Return early if possible.
476 if ( bl1_zero_dim2( m, n ) ) return;
477
478 // We initialize for column-major.
479 n_iter = n;
480 n_elem_max = m;
481 lda = a_cs;
482 inca = a_rs;
483 ldb = b_cs;
484 incb = b_rs;
485
486 // An optimization: if B is row-major, then let's access the matrix
487 // by rows instead of by columns for increased spatial locality.
488 if ( bl1_is_row_storage( b_rs, b_cs ) )
489 {
493 bl1_toggle_uplo( uplo );
494 }
495
496
497 if ( bl1_is_upper( uplo ) )
498 {
499 for ( j = 0; j < n_iter; j++ )
500 {
501 n_elem = bl1_min( j + 1, n_elem_max );
502 a_begin = a + j*lda;
503 b_begin = b + j*ldb;
504
506 n_elem,
507 a_begin, inca,
508 b_begin, incb );
509 }
510 }
511 else // if ( bl1_is_lower( uplo ) )
512 {
513 for ( j = 0; j < n_iter; j++ )
514 {
515 n_elem = bl1_max( 0, n_elem_max - j );
516 a_begin = a + j*lda + j*inca;
517 b_begin = b + j*ldb + j*incb;
518
519 if ( n_elem <= 0 ) break;
520
522 n_elem,
523 a_begin, inca,
524 b_begin, incb );
525 }
526 }
527}
void bl1_sccopyv(conj1_t conj, int m, float *x, int incx, scomplex *y, int incy)
Definition bl1_copyv.c:124

References bl1_is_row_storage(), bl1_is_upper(), bl1_sccopyv(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_scopymr()

void bl1_scopymr ( uplo1_t  uplo,
int  m,
int  n,
float a,
int  a_rs,
int  a_cs,
float b,
int  b_rs,
int  b_cs 
)
14{
15 float* a_begin;
16 float* b_begin;
17 int lda, inca;
18 int ldb, incb;
19 int n_iter;
20 int n_elem_max;
21 int n_elem;
22 int j;
23
24 // Return early if possible.
25 if ( bl1_zero_dim2( m, n ) ) return;
26
27 // We initialize for column-major.
28 n_iter = n;
29 n_elem_max = m;
30 lda = a_cs;
31 inca = a_rs;
32 ldb = b_cs;
33 incb = b_rs;
34
35 // An optimization: if A and B are both row-major, then let's access the
36 // matrices by rows instead of by columns for increased spatial locality.
38 {
42 bl1_toggle_uplo( uplo );
43 }
44
45
46 if ( bl1_is_upper( uplo ) )
47 {
48 for ( j = 0; j < n_iter; j++ )
49 {
50 n_elem = bl1_min( j + 1, n_elem_max );
51 a_begin = a + j*lda;
52 b_begin = b + j*ldb;
53
55 a_begin, inca,
56 b_begin, incb );
57 }
58 }
59 else // if ( bl1_is_lower( uplo ) )
60 {
61 for ( j = 0; j < n_iter; j++ )
62 {
63 n_elem = bl1_max( 0, n_elem_max - j );
64 a_begin = a + j*lda + j*inca;
65 b_begin = b + j*ldb + j*incb;
66
67 if ( n_elem <= 0 ) break;
68
70 a_begin, inca,
71 b_begin, incb );
72 }
73 }
74}
void bl1_scopy(int m, float *x, int incx, float *y, int incy)
Definition bl1_copy.c:13

References bl1_is_row_storage(), bl1_is_upper(), bl1_scopy(), and bl1_zero_dim2().

Referenced by bl1_screate_contigmr(), bl1_sfree_saved_contigmr(), and FLA_Copyr_external().

◆ bl1_sdcopymr()

void bl1_sdcopymr ( uplo1_t  uplo,
int  m,
int  n,
float a,
int  a_rs,
int  a_cs,
double b,
int  b_rs,
int  b_cs 
)
335{
336 float* a_begin;
337 double* b_begin;
338 int lda, inca;
339 int ldb, incb;
340 int n_iter;
341 int n_elem_max;
342 int n_elem;
343 int j;
344
345 // Return early if possible.
346 if ( bl1_zero_dim2( m, n ) ) return;
347
348 // We initialize for column-major.
349 n_iter = n;
350 n_elem_max = m;
351 lda = a_cs;
352 inca = a_rs;
353 ldb = b_cs;
354 incb = b_rs;
355
356 // An optimization: if B is row-major, then let's access the matrix
357 // by rows instead of by columns for increased spatial locality.
358 if ( bl1_is_row_storage( b_rs, b_cs ) )
359 {
363 bl1_toggle_uplo( uplo );
364 }
365
366
367 if ( bl1_is_upper( uplo ) )
368 {
369 for ( j = 0; j < n_iter; j++ )
370 {
371 n_elem = bl1_min( j + 1, n_elem_max );
372 a_begin = a + j*lda;
373 b_begin = b + j*ldb;
374
376 n_elem,
377 a_begin, inca,
378 b_begin, incb );
379 }
380 }
381 else // if ( bl1_is_lower( uplo ) )
382 {
383 for ( j = 0; j < n_iter; j++ )
384 {
385 n_elem = bl1_max( 0, n_elem_max - j );
386 a_begin = a + j*lda + j*inca;
387 b_begin = b + j*ldb + j*incb;
388
389 if ( n_elem <= 0 ) break;
390
392 n_elem,
393 a_begin, inca,
394 b_begin, incb );
395 }
396 }
397}
void bl1_sdcopyv(conj1_t conj, int m, float *x, int incx, double *y, int incy)
Definition bl1_copyv.c:80

References bl1_is_row_storage(), bl1_is_upper(), bl1_sdcopyv(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_sscopymr()

void bl1_sscopymr ( uplo1_t  uplo,
int  m,
int  n,
float a,
int  a_rs,
int  a_cs,
float b,
int  b_rs,
int  b_cs 
)
269{
270 float* a_begin;
271 float* b_begin;
272 int lda, inca;
273 int ldb, incb;
274 int n_iter;
275 int n_elem_max;
276 int n_elem;
277 int j;
278
279 // Return early if possible.
280 if ( bl1_zero_dim2( m, n ) ) return;
281
282 // We initialize for column-major.
283 n_iter = n;
284 n_elem_max = m;
285 lda = a_cs;
286 inca = a_rs;
287 ldb = b_cs;
288 incb = b_rs;
289
290 // An optimization: if B is row-major, then let's access the matrix
291 // by rows instead of by columns for increased spatial locality.
292 if ( bl1_is_row_storage( b_rs, b_cs ) )
293 {
297 bl1_toggle_uplo( uplo );
298 }
299
300
301 if ( bl1_is_upper( uplo ) )
302 {
303 for ( j = 0; j < n_iter; j++ )
304 {
305 n_elem = bl1_min( j + 1, n_elem_max );
306 a_begin = a + j*lda;
307 b_begin = b + j*ldb;
308
310 n_elem,
311 a_begin, inca,
312 b_begin, incb );
313 }
314 }
315 else // if ( bl1_is_lower( uplo ) )
316 {
317 for ( j = 0; j < n_iter; j++ )
318 {
319 n_elem = bl1_max( 0, n_elem_max - j );
320 a_begin = a + j*lda + j*inca;
321 b_begin = b + j*ldb + j*incb;
322
323 if ( n_elem <= 0 ) break;
324
326 n_elem,
327 a_begin, inca,
328 b_begin, incb );
329 }
330 }
331}
void bl1_scopyv(conj1_t conj, int m, float *x, int incx, float *y, int incy)
Definition bl1_copyv.c:35

References bl1_is_row_storage(), bl1_is_upper(), bl1_scopyv(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

◆ bl1_szcopymr()

void bl1_szcopymr ( uplo1_t  uplo,
int  m,
int  n,
float a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
595{
596 float* a_begin;
598 int lda, inca;
599 int ldb, incb;
600 int n_iter;
601 int n_elem_max;
602 int n_elem;
603 int j;
604
605 // Return early if possible.
606 if ( bl1_zero_dim2( m, n ) ) return;
607
608 // We initialize for column-major.
609 n_iter = n;
610 n_elem_max = m;
611 lda = a_cs;
612 inca = a_rs;
613 ldb = b_cs;
614 incb = b_rs;
615
616 // An optimization: if B is row-major, then let's access the matrix
617 // by rows instead of by columns for increased spatial locality.
618 if ( bl1_is_row_storage( b_rs, b_cs ) )
619 {
623 bl1_toggle_uplo( uplo );
624 }
625
626
627 if ( bl1_is_upper( uplo ) )
628 {
629 for ( j = 0; j < n_iter; j++ )
630 {
631 n_elem = bl1_min( j + 1, n_elem_max );
632 a_begin = a + j*lda;
633 b_begin = b + j*ldb;
634
636 n_elem,
637 a_begin, inca,
638 b_begin, incb );
639 }
640 }
641 else // if ( bl1_is_lower( uplo ) )
642 {
643 for ( j = 0; j < n_iter; j++ )
644 {
645 n_elem = bl1_max( 0, n_elem_max - j );
646 a_begin = a + j*lda + j*inca;
647 b_begin = b + j*ldb + j*incb;
648
649 if ( n_elem <= 0 ) break;
650
652 n_elem,
653 a_begin, inca,
654 b_begin, incb );
655 }
656 }
657}
void bl1_szcopyv(conj1_t conj, int m, float *x, int incx, dcomplex *y, int incy)
Definition bl1_copyv.c:169

References bl1_is_row_storage(), bl1_is_upper(), bl1_szcopyv(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_zccopymr()

void bl1_zccopymr ( uplo1_t  uplo,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
1181{
1184 int lda, inca;
1185 int ldb, incb;
1186 int n_iter;
1187 int n_elem_max;
1188 int n_elem;
1189 int j;
1190
1191 // Return early if possible.
1192 if ( bl1_zero_dim2( m, n ) ) return;
1193
1194 // We initialize for column-major.
1195 n_iter = n;
1196 n_elem_max = m;
1197 lda = a_cs;
1198 inca = a_rs;
1199 ldb = b_cs;
1200 incb = b_rs;
1201
1202 // An optimization: if B is row-major, then let's access the matrix
1203 // by rows instead of by columns for increased spatial locality.
1204 if ( bl1_is_row_storage( b_rs, b_cs ) )
1205 {
1209 bl1_toggle_uplo( uplo );
1210 }
1211
1212
1213 if ( bl1_is_upper( uplo ) )
1214 {
1215 for ( j = 0; j < n_iter; j++ )
1216 {
1217 n_elem = bl1_min( j + 1, n_elem_max );
1218 a_begin = a + j*lda;
1219 b_begin = b + j*ldb;
1220
1222 n_elem,
1223 a_begin, inca,
1224 b_begin, incb );
1225 }
1226 }
1227 else // if ( bl1_is_lower( uplo ) )
1228 {
1229 for ( j = 0; j < n_iter; j++ )
1230 {
1231 n_elem = bl1_max( 0, n_elem_max - j );
1232 a_begin = a + j*lda + j*inca;
1233 b_begin = b + j*ldb + j*incb;
1234
1235 if ( n_elem <= 0 ) break;
1236
1238 n_elem,
1239 a_begin, inca,
1240 b_begin, incb );
1241 }
1242 }
1243}
void bl1_zccopyv(conj1_t conj, int m, dcomplex *x, int incx, scomplex *y, int incy)
Definition bl1_copyv.c:330

References bl1_is_row_storage(), bl1_is_upper(), bl1_zccopyv(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_zcopymr()

void bl1_zcopymr ( uplo1_t  uplo,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
203{
206 int lda, inca;
207 int ldb, incb;
208 int n_iter;
209 int n_elem_max;
210 int n_elem;
211 int j;
212
213 // Return early if possible.
214 if ( bl1_zero_dim2( m, n ) ) return;
215
216 // We initialize for column-major.
217 n_iter = n;
218 n_elem_max = m;
219 lda = a_cs;
220 inca = a_rs;
221 ldb = b_cs;
222 incb = b_rs;
223
224 // An optimization: if A and B are both row-major, then let's access the
225 // matrices by rows instead of by columns for increased spatial locality.
227 {
231 bl1_toggle_uplo( uplo );
232 }
233
234
235 if ( bl1_is_upper( uplo ) )
236 {
237 for ( j = 0; j < n_iter; j++ )
238 {
239 n_elem = bl1_min( j + 1, n_elem_max );
240 a_begin = a + j*lda;
241 b_begin = b + j*ldb;
242
244 a_begin, inca,
245 b_begin, incb );
246 }
247 }
248 else // if ( bl1_is_lower( uplo ) )
249 {
250 for ( j = 0; j < n_iter; j++ )
251 {
252 n_elem = bl1_max( 0, n_elem_max - j );
253 a_begin = a + j*lda + j*inca;
254 b_begin = b + j*ldb + j*incb;
255
256 if ( n_elem <= 0 ) break;
257
259 a_begin, inca,
260 b_begin, incb );
261 }
262 }
263}
void bl1_zcopy(int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition bl1_copy.c:52

References bl1_is_row_storage(), bl1_is_upper(), bl1_zcopy(), and bl1_zero_dim2().

Referenced by bl1_zcreate_contigmr(), bl1_zfree_saved_contigmr(), bl1_zfree_saved_contigmsr(), and FLA_Copyr_external().

◆ bl1_zdcopymr()

void bl1_zdcopymr ( uplo1_t  uplo,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
double b,
int  b_rs,
int  b_cs 
)
985{
987 double* b_begin;
988 int lda, inca;
989 int ldb, incb;
990 int n_iter;
991 int n_elem_max;
992 int n_elem;
993 int j;
994
995 // Return early if possible.
996 if ( bl1_zero_dim2( m, n ) ) return;
997
998 // We initialize for column-major.
999 n_iter = n;
1000 n_elem_max = m;
1001 lda = a_cs;
1002 inca = a_rs;
1003 ldb = b_cs;
1004 incb = b_rs;
1005
1006 // An optimization: if B is row-major, then let's access the matrix
1007 // by rows instead of by columns for increased spatial locality.
1008 if ( bl1_is_row_storage( b_rs, b_cs ) )
1009 {
1013 bl1_toggle_uplo( uplo );
1014 }
1015
1016
1017 if ( bl1_is_upper( uplo ) )
1018 {
1019 for ( j = 0; j < n_iter; j++ )
1020 {
1021 n_elem = bl1_min( j + 1, n_elem_max );
1022 a_begin = a + j*lda;
1023 b_begin = b + j*ldb;
1024
1026 n_elem,
1027 a_begin, inca,
1028 b_begin, incb );
1029 }
1030 }
1031 else // if ( bl1_is_lower( uplo ) )
1032 {
1033 for ( j = 0; j < n_iter; j++ )
1034 {
1035 n_elem = bl1_max( 0, n_elem_max - j );
1036 a_begin = a + j*lda + j*inca;
1037 b_begin = b + j*ldb + j*incb;
1038
1039 if ( n_elem <= 0 ) break;
1040
1042 n_elem,
1043 a_begin, inca,
1044 b_begin, incb );
1045 }
1046 }
1047}
void bl1_zdcopyv(conj1_t conj, int m, dcomplex *x, int incx, double *y, int incy)
Definition bl1_copyv.c:281

References bl1_is_row_storage(), bl1_is_upper(), bl1_zdcopyv(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_zscopymr()

void bl1_zscopymr ( uplo1_t  uplo,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
float b,
int  b_rs,
int  b_cs 
)
659{
661 float* b_begin;
662 int lda, inca;
663 int ldb, incb;
664 int n_iter;
665 int n_elem_max;
666 int n_elem;
667 int j;
668
669 // Return early if possible.
670 if ( bl1_zero_dim2( m, n ) ) return;
671
672 // We initialize for column-major.
673 n_iter = n;
674 n_elem_max = m;
675 lda = a_cs;
676 inca = a_rs;
677 ldb = b_cs;
678 incb = b_rs;
679
680 // An optimization: if B is row-major, then let's access the matrix
681 // by rows instead of by columns for increased spatial locality.
682 if ( bl1_is_row_storage( b_rs, b_cs ) )
683 {
687 bl1_toggle_uplo( uplo );
688 }
689
690
691 if ( bl1_is_upper( uplo ) )
692 {
693 for ( j = 0; j < n_iter; j++ )
694 {
695 n_elem = bl1_min( j + 1, n_elem_max );
696 a_begin = a + j*lda;
697 b_begin = b + j*ldb;
698
700 n_elem,
701 a_begin, inca,
702 b_begin, incb );
703 }
704 }
705 else // if ( bl1_is_lower( uplo ) )
706 {
707 for ( j = 0; j < n_iter; j++ )
708 {
709 n_elem = bl1_max( 0, n_elem_max - j );
710 a_begin = a + j*lda + j*inca;
711 b_begin = b + j*ldb + j*incb;
712
713 if ( n_elem <= 0 ) break;
714
716 n_elem,
717 a_begin, inca,
718 b_begin, incb );
719 }
720 }
721}
void bl1_zscopyv(conj1_t conj, int m, dcomplex *x, int incx, float *y, int incy)
Definition bl1_copyv.c:191

References bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), bl1_zscopyv(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Copyr_external().

◆ bl1_zzcopymr()

void bl1_zzcopymr ( uplo1_t  uplo,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
1247{
1250 int lda, inca;
1251 int ldb, incb;
1252 int n_iter;
1253 int n_elem_max;
1254 int n_elem;
1255 int j;
1256
1257 // Return early if possible.
1258 if ( bl1_zero_dim2( m, n ) ) return;
1259
1260 // We initialize for column-major.
1261 n_iter = n;
1262 n_elem_max = m;
1263 lda = a_cs;
1264 inca = a_rs;
1265 ldb = b_cs;
1266 incb = b_rs;
1267
1268 // An optimization: if B is row-major, then let's access the matrix
1269 // by rows instead of by columns for increased spatial locality.
1270 if ( bl1_is_row_storage( b_rs, b_cs ) )
1271 {
1275 bl1_toggle_uplo( uplo );
1276 }
1277
1278
1279 if ( bl1_is_upper( uplo ) )
1280 {
1281 for ( j = 0; j < n_iter; j++ )
1282 {
1283 n_elem = bl1_min( j + 1, n_elem_max );
1284 a_begin = a + j*lda;
1285 b_begin = b + j*ldb;
1286
1288 n_elem,
1289 a_begin, inca,
1290 b_begin, incb );
1291 }
1292 }
1293 else // if ( bl1_is_lower( uplo ) )
1294 {
1295 for ( j = 0; j < n_iter; j++ )
1296 {
1297 n_elem = bl1_max( 0, n_elem_max - j );
1298 a_begin = a + j*lda + j*inca;
1299 b_begin = b + j*ldb + j*incb;
1300
1301 if ( n_elem <= 0 ) break;
1302
1304 n_elem,
1305 a_begin, inca,
1306 b_begin, incb );
1307 }
1308 }
1309}
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition bl1_copyv.c:63

References bl1_is_row_storage(), bl1_is_upper(), bl1_zcopyv(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.