heat.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * StarPU
  3. * Copyright (C) Université Bordeaux 1, CNRS 2008-2010 (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 STARPU_OPENGL_RENDER
  24. #include <starpu_config.h>
  25. #include <starpu.h>
  26. #include <common/blas.h>
  27. #ifdef STARPU_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) ((unsigned long)((thick)+(theta)*nthick))
  39. #define NODE_TO_THICK(n) ((n) % nthick)
  40. #define NODE_TO_THETA(n) ((n) / nthick)
  41. typedef struct point_t {
  42. float x;
  43. float y;
  44. } point;
  45. extern void dw_factoLU(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned version, unsigned no_prio);
  46. extern void dw_factoLU_tag(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned no_prio);
  47. extern void dw_factoLU_grain(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned nbigblocks);
  48. extern void initialize_system(float **A, float **B, unsigned dim, unsigned pinned);
  49. void display_stat_heat(void);
  50. #ifdef STARPU_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__