heat.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009, 2010, 2011-2012 Université de Bordeaux 1
  4. * Copyright (C) 2010, 2011 Centre National de la Recherche Scientifique
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #ifndef __HEAT_H__
  18. #define __HEAT_H__
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21. #include <string.h>
  22. #include <assert.h>
  23. #include <math.h>
  24. /* needed for STARPU_OPENGL_RENDER */
  25. #include <starpu_config.h>
  26. #include <starpu.h>
  27. #include <common/blas.h>
  28. #ifdef STARPU_OPENGL_RENDER
  29. #include <GL/gl.h>
  30. #include <GL/glu.h>
  31. #include <GL/glut.h>
  32. #endif
  33. #define FPRINTF(ofile, fmt, args ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ##args); }} while(0)
  34. #define X 0
  35. #define Y 1
  36. #define DIM ntheta*nthick
  37. #define RMIN (150.0f)
  38. #define RMAX (200.0f)
  39. #define Pi (3.141592f)
  40. #define NODE_NUMBER(theta, thick) ((unsigned long)((thick)+(theta)*nthick))
  41. #define NODE_TO_THICK(n) ((n) % nthick)
  42. #define NODE_TO_THETA(n) ((n) / nthick)
  43. typedef struct point_t
  44. {
  45. float x;
  46. float y;
  47. } point;
  48. extern void dw_factoLU(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned version, unsigned no_prio);
  49. extern void dw_factoLU_tag(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned no_prio);
  50. extern void dw_factoLU_grain(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned nbigblocks);
  51. extern void initialize_system(float **A, float **B, unsigned dim, unsigned pinned);
  52. extern void free_system(float *A, float *B, unsigned dim, unsigned pinned);
  53. void display_stat_heat(void);
  54. #ifdef STARPU_OPENGL_RENDER
  55. extern void opengl_render(unsigned _ntheta, unsigned _nthick, float *_result, point *_pmesh, int argc_, char **argv_);
  56. #endif
  57. #endif /* __HEAT_H__ */