heat.h 1.7 KB

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