Change function get_num_threads to get_cuda_num_threads

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti
2023-11-21 14:40:19 +01:00
parent a460fffa19
commit 2f13291817
5 changed files with 8 additions and 8 deletions

View File

@@ -39,8 +39,8 @@ extern double myrandom(int*);
extern void random_reset(int *seed, int ibase, double *coord);
extern int str2ff(const char *string);
extern const char* ff2str(int ff);
extern int get_num_threads();
extern void readline(char *line, FILE *fp);
extern void debug_printf(const char *format, ...);
extern int get_cuda_num_threads();
#endif

View File

@@ -79,7 +79,7 @@ const char* ff2str(int ff) {
return "invalid";
}
int get_num_threads() {
int get_cuda_num_threads() {
const char *num_threads_env = getenv("NUM_THREADS");
return (num_threads_env == NULL) ? 32 : atoi(num_threads_env);
}