23 int lm,
int ln,
int i,
int j,
int m,
int n)
29 desc.
A21 = (lm - lm%mb)*(ln - ln%nb);
30 desc.
A12 = ( lm%mb)*(ln - ln%nb) + desc.
A21;
31 desc.
A22 = (lm - lm%mb)*( ln%nb) + desc.
A12;
43 desc.
lmt = (lm%mb==0) ? (lm/mb) : (lm/mb+1);
44 desc.
lnt = (ln%nb==0) ? (ln/nb) : (ln/nb+1);
51 desc.
mt = (i+m-1)/mb - i/mb + 1;
52 desc.
nt = (j+n-1)/nb - j/nb + 1;
74 descB.
mt = (i+m-1)/mb - i/mb + 1;
75 descB.
nt = (j+n-1)/nb - j/nb + 1;
84 if (desc->
mat == NULL) {
85 plasma_error(
"plasma_desc_check",
"NULL matrix pointer");
92 plasma_error(
"plasma_desc_check",
"invalid matrix type");
95 if (desc->
mb <= 0 || desc->
nb <= 0) {
96 plasma_error(
"plasma_desc_check",
"negative tile dimension");
99 if (desc->
bsiz < desc->
mb*desc->
nb) {
100 plasma_error(
"plasma_desc_check",
"tile memory size smaller than the product of dimensions");
103 if (desc->
lm <= 0 || desc->
ln <= 0) {
104 plasma_error(
"plasma_desc_check",
"negative matrix dimension");
107 if (desc->
i >= desc->
lm || desc->
j >= desc->
ln) {
108 plasma_error(
"plasma_desc_check",
"beginning of the matrix out of scope");
111 if (desc->
i+desc->
m > desc->
lm || desc->
j+desc->
n > desc->
ln) {
112 plasma_error(
"plasma_desc_check",
"submatrix out of scope");
126 if ((desc->
mat = malloc(size)) == NULL) {
127 plasma_error(
"plasma_desc_mat_alloc",
"malloc() failed");
131 memset(desc->
mat, 0, size );
140 if (desc->
mat != NULL) {
202 int lm,
int ln,
int i,
int j,
int m,
int n)
208 if (plasma == NULL) {
209 plasma_error(
"PLASMA_Desc_Create",
"PLASMA not initialized");
222 plasma_error(
"PLASMA_Desc_Create",
"invalid descriptor");
250 if (plasma == NULL) {
251 plasma_error(
"PLASMA_Desc_Destroy",
"PLASMA not initialized");
255 plasma_error(
"PLASMA_Desc_Destroy",
"attempting to destroy a NULL descriptor");