[patch, fortran] Reduce stack use in blocked matmul

Thomas Koenig tkoenig@netcologne.de
Tue May 9 17:16:00 GMT 2017


Am 09.05.2017 um 12:43 schrieb Andreas Schwab:
> On Mai 05 2017, Thomas Koenig <tkoenig@netcologne.de> wrote:
> 
>> @@ -227,6 +226,17 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
>>         if (m == 0 || n == 0 || k == 0)
>>   	return;
>>   
>> +      /* Adjust size of t1 to what is needed.  */
>> +      index_type t1_dim;
>> +      t1_dim = (a_dim1-1) * 256 + b_dim1;
>> +      if (t1_dim > 65536)
>> +	t1_dim = 65536;
> 
> What happens if (a_dim1-1) * 256 + b_dim1 > 65536?

t1 is an auxiliary variable for blocking.  If that
condition is true, blocking starts to happen.

Regards

	Thomas



More information about the Fortran mailing list