Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Gross <sgross@fb.com>2016-10-26 22:31:29 +0300
committerSam Gross <sgross@fb.com>2016-10-26 22:35:05 +0300
commitedc6573eae79c561389d9fafa18932f980068a57 (patch)
tree7f0293d49eecadbf3d8042bfcce82782aefa4bbb
parentfecf29bb6ad7b8117eff9712d833972205de1201 (diff)
Fix no-arg function prototypes
-rw-r--r--lib/TH/THGeneral.c4
-rw-r--r--lib/TH/THGeneral.h.in4
-rw-r--r--lib/TH/generic/THVector.h2
-rw-r--r--lib/TH/generic/THVectorDispatch.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/TH/THGeneral.c b/lib/TH/THGeneral.c
index 486a667..cb9c79e 100644
--- a/lib/TH/THGeneral.c
+++ b/lib/TH/THGeneral.c
@@ -326,7 +326,7 @@ void THSetNumThreads(int num_threads)
#endif
}
-int THGetNumThreads()
+int THGetNumThreads(void)
{
#ifdef _OPENMP
return omp_get_max_threads();
@@ -335,7 +335,7 @@ int THGetNumThreads()
#endif
}
-int THGetNumCores()
+int THGetNumCores(void)
{
#ifdef _OPENMP
return omp_get_num_procs();
diff --git a/lib/TH/THGeneral.h.in b/lib/TH/THGeneral.h.in
index 02c3832..bc7e448 100644
--- a/lib/TH/THGeneral.h.in
+++ b/lib/TH/THGeneral.h.in
@@ -65,8 +65,8 @@ TH_API void THSetGCHandler( void (*torchGCHandlerFunction)(void *data), void *da
// this hook should only be called by custom allocator functions
TH_API void THHeapUpdate(ptrdiff_t size);
TH_API void THSetNumThreads(int num_threads);
-TH_API int THGetNumThreads();
-TH_API int THGetNumCores();
+TH_API int THGetNumThreads(void);
+TH_API int THGetNumCores(void);
#define THError(...) _THError(__FILE__, __LINE__, __VA_ARGS__)
diff --git a/lib/TH/generic/THVector.h b/lib/TH/generic/THVector.h
index 5326b16..67fdcfa 100644
--- a/lib/TH/generic/THVector.h
+++ b/lib/TH/generic/THVector.h
@@ -9,6 +9,6 @@ TH_API void THVector_(scale)(real *y, const real c, const ptrdiff_t n);
TH_API void THVector_(mul)(real *y, const real *x, const ptrdiff_t n);
/* Initialize the dispatch pointers */
-TH_API void THVector_(vectorDispatchInit)();
+TH_API void THVector_(vectorDispatchInit)(void);
#endif
diff --git a/lib/TH/generic/THVectorDispatch.c b/lib/TH/generic/THVectorDispatch.c
index eae5073..6fd1d68 100644
--- a/lib/TH/generic/THVectorDispatch.c
+++ b/lib/TH/generic/THVectorDispatch.c
@@ -127,7 +127,7 @@ void THVector_(mul)(real *y, const real *x, const ptrdiff_t n) {
* This means that in the dispatch tables, implementations supporting more recent extensions
* need to come first
*/
-void THVector_(vectorDispatchInit)()
+void THVector_(vectorDispatchInit)(void)
{
uint32_t hostSimdExts = detectHostSIMDExtensions();
INIT_DISPATCH_PTR(fill);