1
#include "atlas_misc.h"
2
#include "atlas_tlvl3.h"
5
* ====================================================================
6
* This function will eventually be generated, but for now just written
7
* ====================================================================
9
int Mjoin(PATL,tNumGemmThreads)(ATL_CINT M, ATL_CINT N, ATL_CINT K)
11
* RETURNS : estimate of how many threads will be used to run the problem,
12
* assuming we will actually do threading (i.e. THRESH is exceeded)
13
* 0 is returned if this number is 1 or less.
18
if (M < 4 || N < 4 || K < 4)
20
flops = ((2.0*M)*N)*K;
21
np = flops / ATL_TGEMM_PERTHR_MF;
22
np = (np <= 1) ? 0 : np;
23
return(np >= ATL_NTHREADS ? ATL_NTHREADS : np);
26
int Mjoin(PATL,GemmWillThread)(ATL_CINT M, ATL_CINT N, ATL_CINT K)
28
* Returns: 0 if threshold FLOPS not achieved, rough # of threads used else
31
if (((2.0*M)*N)*K < ATL_TGEMM_THRESH_MF)
33
return(Mjoin(PATL,tNumGemmThreads)(M,N,K));