From 031cef558e9d334f49f2decdaf7ac05cfdd04640 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 6 Feb 2024 20:18:43 -0500 Subject: [PATCH] silence unused parameter warnings in the gpu lib tree --- lib/gpu/geryon/ocl_memory.h | 80 ++++++++++++++++----------------- lib/gpu/geryon/ucl_copy.h | 2 +- lib/gpu/geryon/ucl_d_vec.h | 12 ++--- lib/gpu/geryon/ucl_h_vec.h | 10 ++--- lib/gpu/geryon/ucl_print.h | 4 +- lib/gpu/geryon/ucl_s_obj_help.h | 10 ++--- lib/gpu/geryon/ucl_vector.h | 4 +- 7 files changed, 61 insertions(+), 61 deletions(-) diff --git a/lib/gpu/geryon/ocl_memory.h b/lib/gpu/geryon/ocl_memory.h index e665654071..294578101d 100644 --- a/lib/gpu/geryon/ocl_memory.h +++ b/lib/gpu/geryon/ocl_memory.h @@ -491,17 +491,17 @@ template struct _ucl_memcpy; // Both are images template<> struct _ucl_memcpy<2,2> { template - static inline void mc(p1 &dst, const p2 &src, const size_t n, - cl_command_queue &cq, const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const p2 &/*src*/, const size_t /*n*/, + cl_command_queue &/*cq*/, const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } template - static inline void mc(p1 &dst, const size_t dpitch, const p2 &src, - const size_t spitch, const size_t cols, - const size_t rows, cl_command_queue &cq, - const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const size_t /*dpitch*/, const p2 &/*src*/, + const size_t /*spitch*/, const size_t /*cols*/, + const size_t /*rows*/, cl_command_queue &/*cq*/, + const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } }; @@ -509,17 +509,17 @@ template<> struct _ucl_memcpy<2,2> { // Destination is texture, source on device template<> struct _ucl_memcpy<2,0> { template - static inline void mc(p1 &dst, const p2 &src, const size_t n, - cl_command_queue &cq, const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const p2 &/*src*/, const size_t /*n*/, + cl_command_queue &/*cq*/, const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } template - static inline void mc(p1 &dst, const size_t dpitch, const p2 &src, - const size_t spitch, const size_t cols, - const size_t rows, cl_command_queue &cq, - const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const size_t /*dpitch*/, const p2 &/*src*/, + const size_t /*spitch*/, const size_t /*cols*/, + const size_t /*rows*/, cl_command_queue &/*cq*/, + const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } }; @@ -527,17 +527,17 @@ template<> struct _ucl_memcpy<2,0> { // Destination is texture, source on host template<> struct _ucl_memcpy<2,1> { template - static inline void mc(p1 &dst, const p2 &src, const size_t n, - cl_command_queue &cq, const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const p2 &/*src*/, const size_t /*n*/, + cl_command_queue &/*cq*/, const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } template - static inline void mc(p1 &dst, const size_t dpitch, const p2 &src, - const size_t spitch, const size_t cols, - const size_t rows, cl_command_queue &cq, - const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const size_t /*dpitch*/, const p2 &/*src*/, + const size_t /*spitch*/, const size_t /*cols*/, + const size_t /*rows*/, cl_command_queue &/*cq*/, + const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } }; @@ -545,17 +545,17 @@ template<> struct _ucl_memcpy<2,1> { // Source is texture, dest on device template<> struct _ucl_memcpy<0,2> { template - static inline void mc(p1 &dst, const p2 &src, const size_t n, - cl_command_queue &cq, const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const p2 &/*src*/, const size_t /*n*/, + cl_command_queue &/*cq*/, const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } template - static inline void mc(p1 &dst, const size_t dpitch, const p2 &src, - const size_t spitch, const size_t cols, - const size_t rows, cl_command_queue &cq, - const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const size_t /*dpitch*/, const p2 &/*src*/, + const size_t /*spitch*/, const size_t /*cols*/, + const size_t /*rows*/, cl_command_queue &/*cq*/, + const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } }; @@ -563,17 +563,17 @@ template<> struct _ucl_memcpy<0,2> { // Source is texture, dest on host template<> struct _ucl_memcpy<1,2> { template - static inline void mc(p1 &dst, const p2 &src, const size_t n, - cl_command_queue &cq, const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const p2 &/*src*/, const size_t /*n*/, + cl_command_queue &/*cq*/, const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } template - static inline void mc(p1 &dst, const size_t dpitch, const p2 &src, - const size_t spitch, const size_t cols, - const size_t rows, cl_command_queue &cq, - const cl_bool block, - const size_t dst_offset, const size_t src_offset) { + static inline void mc(p1 &/*dst*/, const size_t /*dpitch*/, const p2 &/*src*/, + const size_t /*spitch*/, const size_t /*cols*/, + const size_t /*rows*/, cl_command_queue &/*cq*/, + const cl_bool /*block*/, + const size_t /*dst_offset*/, const size_t /*src_offset*/) { assert(0==1); } }; diff --git a/lib/gpu/geryon/ucl_copy.h b/lib/gpu/geryon/ucl_copy.h index 94b57f7a09..b7f4c4c986 100644 --- a/lib/gpu/geryon/ucl_copy.h +++ b/lib/gpu/geryon/ucl_copy.h @@ -507,7 +507,7 @@ template <> struct _ucl_cast_copy<0,0> { } template static inline void cc(mat1 & /*dst*/, const mat2 & /*src*/, const size_t /*rows*/, - const size_t cols, mat3 & /*cast_buffer*/, command_queue & /*cq*/) { + const size_t /*cols*/, mat3 & /*cast_buffer*/, command_queue & /*cq*/) { assert(0==1); } }; diff --git a/lib/gpu/geryon/ucl_d_vec.h b/lib/gpu/geryon/ucl_d_vec.h index 5e281fef07..fdb62d8fab 100644 --- a/lib/gpu/geryon/ucl_d_vec.h +++ b/lib/gpu/geryon/ucl_d_vec.h @@ -156,7 +156,7 @@ class UCL_D_Vec : public UCL_BaseMat { * \param stride Number of _elements_ between the start of each row **/ template inline void view(ucl_type &input, const size_t rows, const size_t cols, - const size_t stride) { view(input,rows,cols); } + const size_t /*stride*/) { view(input,rows,cols); } /// Do not allocate memory, instead use an existing allocation from Geryon /** This function must be passed a Geryon vector or matrix container. @@ -185,7 +185,7 @@ class UCL_D_Vec : public UCL_BaseMat { * - The view does not prevent the memory from being freed by the * allocating container when using CUDA APIs **/ template - inline void view(ptr_type input, const size_t rows, const size_t cols, + inline void view(ptr_type input, const size_t /*rows*/, const size_t cols, UCL_Device &dev) { #ifdef UCL_DEBUG assert(rows==1); @@ -213,7 +213,7 @@ class UCL_D_Vec : public UCL_BaseMat { * \param stride Number of _elements_ between the start of each row **/ template inline void view(ptr_type input, const size_t rows, const size_t cols, - const size_t stride, UCL_Device &dev) + const size_t stride, UCL_Device &/*dev*/) { view(input,rows,cols,stride); } /// Do not allocate memory, instead use an existing allocation @@ -262,7 +262,7 @@ class UCL_D_Vec : public UCL_BaseMat { * \param stride Number of _elements_ between the start of each row **/ template inline void view_offset(const size_t offset,ucl_type &input,const size_t rows, - const size_t cols, const size_t stride) + const size_t cols, const size_t /*stride*/) { view_offset(offset,input,rows,cols); } /// Do not allocate memory, instead use an existing allocation from Geryon @@ -292,7 +292,7 @@ class UCL_D_Vec : public UCL_BaseMat { * - The view does not prevent the memory from being freed by the * allocating container when using CUDA APIs **/ template - inline void view_offset(const size_t offset,ptr_type input,const size_t rows, + inline void view_offset(const size_t offset,ptr_type input,const size_t /*rows*/, const size_t cols, UCL_Device &dev) { #ifdef UCL_DEBUG assert(rows==1); @@ -328,7 +328,7 @@ class UCL_D_Vec : public UCL_BaseMat { * \param stride Number of _elements_ between the start of each row **/ template inline void view_offset(const size_t offset,ptr_type input,const size_t rows, - const size_t cols,const size_t stride,UCL_Device &dev) + const size_t cols,const size_t stride,UCL_Device &/*dev*/) { view_offset(offset,input,rows,cols,stride); } /// Do not allocate memory, instead use an existing allocation diff --git a/lib/gpu/geryon/ucl_h_vec.h b/lib/gpu/geryon/ucl_h_vec.h index 9f734ac40c..25e12a3ef5 100644 --- a/lib/gpu/geryon/ucl_h_vec.h +++ b/lib/gpu/geryon/ucl_h_vec.h @@ -156,7 +156,7 @@ class UCL_H_Vec : public UCL_BaseMat { * \param stride Number of _elements_ between the start of each row **/ template inline void view(ucl_type &input, const size_t rows, const size_t cols, - const size_t stride) { view(input,rows,cols); } + const size_t /*stride*/) { view(input,rows,cols); } /// Do not allocate memory, instead use an existing allocation from Geryon /** This function must be passed a Geryon vector or matrix container. @@ -214,7 +214,7 @@ class UCL_H_Vec : public UCL_BaseMat { * \param stride Number of _elements_ between the start of each row **/ template inline void view(ptr_type *input, const size_t rows, const size_t cols, - const size_t stride, UCL_Device &dev) + const size_t stride, UCL_Device &/*dev*/) { view(input,rows,cols,stride); } /// Do not allocate memory, instead use an existing allocation @@ -259,7 +259,7 @@ class UCL_H_Vec : public UCL_BaseMat { * \param stride Number of _elements_ between the start of each row **/ template inline void view_offset(const size_t offset,ucl_type &input,const size_t rows, - const size_t cols, const size_t stride) + const size_t cols, const size_t /*stride*/) { view_offset(offset,input,rows,cols); } /// Do not allocate memory, instead use an existing allocation from Geryon @@ -382,10 +382,10 @@ class UCL_H_Vec : public UCL_BaseMat { /// Get element at index i inline const numtyp & operator[](const int i) const { return _array[i]; } /// 2D access (row should always be 0) - inline numtyp & operator()(const int row, const int col) + inline numtyp & operator()(const int /*row*/, const int col) { return _array[col]; } /// 2D access (row should always be 0) - inline const numtyp & operator()(const int row, const int col) const + inline const numtyp & operator()(const int /*row*/, const int col) const { return _array[col]; } /// Returns pointer to memory pointer for allocation on host diff --git a/lib/gpu/geryon/ucl_print.h b/lib/gpu/geryon/ucl_print.h index 98ae8a8c06..6b1caf90e9 100644 --- a/lib/gpu/geryon/ucl_print.h +++ b/lib/gpu/geryon/ucl_print.h @@ -35,7 +35,7 @@ template <> struct _ucl_print<1> { } template static inline void p(const mat_type &mat, const size_t n, std::ostream &out, - const std::string delim, UCL_Device &dev) { + const std::string delim, UCL_Device &/*dev*/) { p(mat,n,out,delim); } template @@ -59,7 +59,7 @@ template <> struct _ucl_print<1> { template static inline void p(const mat_type &mat,const size_t rows,const size_t cols, std::ostream &out,const std::string delim, - const std::string row_delim, UCL_Device &dev) { + const std::string row_delim, UCL_Device &/*dev*/) { p(mat,rows,cols,out,delim,row_delim); } }; diff --git a/lib/gpu/geryon/ucl_s_obj_help.h b/lib/gpu/geryon/ucl_s_obj_help.h index 9bc2c40fe2..486caa4f2a 100644 --- a/lib/gpu/geryon/ucl_s_obj_help.h +++ b/lib/gpu/geryon/ucl_s_obj_help.h @@ -53,7 +53,7 @@ template <> struct _ucl_s_obj_help<1> { } template - static inline int alloc(t1 &host, t2 &device, t3 &_buffer, + static inline int alloc(t1 &host, t2 &device, t3 &/*_buffer*/, const int cols, mat_type &cq, const enum UCL_MEMOPT kind1, const enum UCL_MEMOPT kind2) { @@ -79,7 +79,7 @@ template <> struct _ucl_s_obj_help<1> { } template - static inline int alloc(t1 &host, t2 &device, t3 &_buffer, + static inline int alloc(t1 &host, t2 &device, t3 &/*_buffer*/, const int rows, const int cols, UCL_Device &acc, const enum UCL_MEMOPT kind1, const enum UCL_MEMOPT kind2) { @@ -105,7 +105,7 @@ template <> struct _ucl_s_obj_help<1> { } template - static inline int alloc(t1 &host, t2 &device, t3 &_buffer, + static inline int alloc(t1 &host, t2 &device, t3 &/*_buffer*/, const int rows, const int cols, mat_type &cq, const enum UCL_MEMOPT kind1, const enum UCL_MEMOPT kind2) { @@ -177,7 +177,7 @@ template <> struct _ucl_s_obj_help<1> { } template - static inline int dev_resize(t1 &device, t2 &host, t3 &buff, const int rows, + static inline int dev_resize(t1 &device, t2 &host, t3 &/*buff*/, const int rows, const int cols) { if (device.kind()==UCL_VIEW) { device.view(host); @@ -369,7 +369,7 @@ template struct _ucl_s_obj_help { } template - static inline int dev_resize(t1 &device, t2 &host, t3 &buff, const int rows, + static inline int dev_resize(t1 &device, t2 &/*host*/, t3 &buff, const int rows, const int cols) { int err=buff.resize(rows,cols); if (err!=UCL_SUCCESS) diff --git a/lib/gpu/geryon/ucl_vector.h b/lib/gpu/geryon/ucl_vector.h index 0939bae31e..10290f0585 100644 --- a/lib/gpu/geryon/ucl_vector.h +++ b/lib/gpu/geryon/ucl_vector.h @@ -147,10 +147,10 @@ class UCL_Vector { /// Get element at index i inline const hosttype & operator[](const int i) const { return host[i]; } /// 2D access (row should always be 0) - inline hosttype & operator()(const int row, const int col) + inline hosttype & operator()(const int /*row*/, const int col) { return host[col]; } /// 2D access (row should always be 0) - inline const hosttype & operator()(const int row, const int col) const + inline const hosttype & operator()(const int /*row*/, const int col) const { return host[col]; } /// Returns pointer to memory pointer for allocation on host