starpu_check_pthread.sh 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2017-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  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. dirname=$(dirname $0)
  18. sgrep="grep --exclude-dir=.git --binary-files=without-match"
  19. macros=$(grep define $dirname/../../../include/starpu_thread_util.h | grep "define STARPU" | awk -F'(' '{print $1}' |awk '{print $2}')
  20. for m in $macros
  21. do
  22. func=$(echo $m | tr '[A-Z]' '[a-z]')
  23. echo processing $func
  24. pthread=$(echo $func | sed 's/starpu_//')
  25. $sgrep -rsl $func
  26. echo
  27. $sgrep -rs $pthread | grep -v $func
  28. read
  29. done