MAGMA  magma-1.4.0
Matrix Algebra on GPU and Multicore Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
magma_sbulgeinc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gbstrct_blg
 

Macros

#define PRECISION_s
 
#define MAX_THREADS_BLG   256
 
#define MAX_EVENTSBLG   163840
 
#define __attribute__(x)   /*NOTHING*/
 
#define core_event_startblg(my_core_id)   event_start_timeblg[my_core_id] = magma_wtime();
 
#define core_event_endblg(my_core_id)   event_end_timeblg[my_core_id] = magma_wtime();
 
#define core_log_eventblg(event, my_core_id)
 

Functions

void findVTpos (magma_int_t N, magma_int_t NB, magma_int_t Vblksiz, magma_int_t sweep, magma_int_t st, magma_int_t *Vpos, magma_int_t *TAUpos, magma_int_t *Tpos, magma_int_t *myblkid)
 
void findVTsiz (magma_int_t N, magma_int_t NB, magma_int_t Vblksiz, magma_int_t *blkcnt, magma_int_t *LDV)
 
magma_int_t plasma_ceildiv (magma_int_t a, magma_int_t b)
 
int event_numblg[MAX_THREADS_BLG__attribute__ ((aligned(128)))
 

Variables

struct gbstrct_blg core_in_all
 
int log_eventsblg
 

Macro Definition Documentation

#define __attribute__ (   x)    /*NOTHING*/

Definition at line 105 of file magma_sbulgeinc.h.

#define core_event_endblg (   my_core_id)    event_end_timeblg[my_core_id] = magma_wtime();

Definition at line 122 of file magma_sbulgeinc.h.

#define core_event_startblg (   my_core_id)    event_start_timeblg[my_core_id] = magma_wtime();

Definition at line 119 of file magma_sbulgeinc.h.

#define core_log_eventblg (   event,
  my_core_id 
)
Value:
event_logblg[my_core_id][event_numblg[my_core_id]+0] = my_core_id;\
event_logblg[my_core_id][event_numblg[my_core_id]+1] = event_start_timeblg[my_core_id];\
event_logblg[my_core_id][event_numblg[my_core_id]+2] = event_end_timeblg[my_core_id];\
event_logblg[my_core_id][event_numblg[my_core_id]+3] = (event);\
event_numblg[my_core_id] += (log_eventsblg << 2);\
event_numblg[my_core_id] &= (MAX_EVENTSBLG-1);
int log_eventsblg
#define MAX_EVENTSBLG

Definition at line 125 of file magma_sbulgeinc.h.

#define MAX_EVENTSBLG   163840

Definition at line 100 of file magma_sbulgeinc.h.

#define MAX_THREADS_BLG   256

Configuration

Definition at line 26 of file magma_sbulgeinc.h.

#define PRECISION_s

Definition at line 14 of file magma_sbulgeinc.h.

Function Documentation

int event_numblg [MAX_THREADS_BLG] __attribute__ ( (aligned(128))  )
void findVTpos ( magma_int_t  N,
magma_int_t  NB,
magma_int_t  Vblksiz,
magma_int_t  sweep,
magma_int_t  st,
magma_int_t Vpos,
magma_int_t TAUpos,
magma_int_t Tpos,
magma_int_t myblkid 
)

Definition at line 226 of file bulge_auxiliary.cpp.

227  {
228  // to be able to use and compare with the old reduction function.
229  // route the old function to the new ones because the changes are done on the new function.
230  magma_int_t ldv = NB + Vblksiz;
231  magma_int_t ldt = Vblksiz;
232  magma_bulge_findVTAUTpos(N, NB, Vblksiz, sweep, st, ldv, ldt,
233  Vpos, TAUpos, Tpos, myblkid);
234  return;
235 
236 
237  magma_int_t locblknb, prevblkcnt, prevGblkid;
238  magma_int_t myblknb, nbprevGblk, mastersweep;
239  magma_int_t blkid, locj, LDV;
240  locblknb = 0;
241  prevblkcnt = 0;
242  myblknb = 0;
243 
244  nbprevGblk = sweep/Vblksiz;
245  for (prevGblkid = 0; prevGblkid < nbprevGblk; prevGblkid++)
246  {
247  mastersweep = prevGblkid * Vblksiz;
248  locblknb = plasma_ceildiv((N-(mastersweep+2)),NB);
249  prevblkcnt = prevblkcnt + locblknb;
250  }
251  myblknb = plasma_ceildiv((st-sweep),NB);
252  blkid = prevblkcnt + myblknb -1;
253  locj = sweep%Vblksiz;
254  LDV = NB + Vblksiz;
255 
256  *myblkid= blkid;
257  *Vpos = blkid*Vblksiz*LDV + locj*LDV + locj;
258  *TAUpos = blkid*Vblksiz + locj;
259  *Tpos = blkid*Vblksiz*Vblksiz + locj*Vblksiz + locj;
260  //printf("voici blkid %d locj %d vpos %d tpos %d \n",blkid,locj,*Vpos,*Tpos);
261  }
magma_int_t plasma_ceildiv(magma_int_t a, magma_int_t b)
int magma_int_t
Definition: magmablas.h:12
magma_int_t ldv
void magma_bulge_findVTAUTpos(magma_int_t n, magma_int_t nb, magma_int_t Vblksiz, magma_int_t sweep, magma_int_t st, magma_int_t ldv, magma_int_t ldt, magma_int_t *Vpos, magma_int_t *TAUpos, magma_int_t *Tpos, magma_int_t *blkid)
void findVTsiz ( magma_int_t  N,
magma_int_t  NB,
magma_int_t  Vblksiz,
magma_int_t blkcnt,
magma_int_t LDV 
)

Definition at line 265 of file bulge_auxiliary.cpp.

266  {
267  magma_int_t colblk, nbcolblk;
268  magma_int_t myblknb, mastersweep;
269 
270  *blkcnt = 0;
271  nbcolblk = plasma_ceildiv((N-1),Vblksiz);
272  for (colblk = 0; colblk<nbcolblk; colblk++)
273  {
274  mastersweep = colblk * Vblksiz;
275  if(colblk == (nbcolblk-1))
276  myblknb = magma_ceildiv((N-(mastersweep+1)),NB);
277  else
278  myblknb = magma_ceildiv((N-(mastersweep+2)),NB);
279 
280  *blkcnt = *blkcnt + myblknb;
281  //printf("voici nbcolblk %d master sweep %d blkcnt %d \n",nbcolblk, mastersweep,*blkcnt);
282  }
283  *LDV= NB+Vblksiz;
284  }
magma_int_t plasma_ceildiv(magma_int_t a, magma_int_t b)
int magma_int_t
Definition: magmablas.h:12
magma_int_t magma_ceildiv(magma_int_t a, magma_int_t b)
Definition: magma_bulge.h:16
magma_int_t plasma_ceildiv ( magma_int_t  a,
magma_int_t  b 
)

Definition at line 221 of file bulge_auxiliary.cpp.

222  {
223  return magma_ceildiv(a,b);
224  }
magma_int_t magma_ceildiv(magma_int_t a, magma_int_t b)
Definition: magma_bulge.h:16

Variable Documentation

struct gbstrct_blg core_in_all

Definition at line 85 of file zhetrd_bhe2trc_v3.cpp.

int log_eventsblg

Definition at line 90 of file zhetrd_bhe2trc_v3.cpp.