Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Unused Parameter Warnings #417

Merged
merged 3 commits into from
Dec 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/batched/KokkosBatched_InnerLU_Serial_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ namespace KokkosBatched {
KOKKOS_INLINE_FUNCTION
int
InnerLU<1>::
serial_invoke(ValueType *__restrict__ A) {
serial_invoke(ValueType *__restrict__ /* A */) {
return 0;
}

Expand Down
16 changes: 8 additions & 8 deletions src/batched/KokkosBatched_InnerTrsm_Serial_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ namespace KokkosBatched {
KOKKOS_INLINE_FUNCTION
int
InnerTrsmLeftLowerUnitDiag<1>::
serial_invoke(const ValueType *__restrict__ A,
const int n,
/**/ ValueType *__restrict__ B) {
serial_invoke(const ValueType *__restrict__ /* A */,
const int /* n */,
/**/ ValueType *__restrict__ /* B */) {
return 0;
}

Expand Down Expand Up @@ -629,7 +629,7 @@ namespace KokkosBatched {
inv_a_00 = static_cast<ValueType>(1.0)/A[0*_as0+0*_as1];

auto trsv = [&](const int p,
ValueType &b_0p) {
ValueType &/* b_0p */) {
B[0*_bs0+p*_bs1] *= inv_a_00; /* b_0p /= a_00;*/
};

Expand Down Expand Up @@ -959,9 +959,9 @@ namespace KokkosBatched {
KOKKOS_INLINE_FUNCTION
int
InnerTrsmLeftUpperUnitDiag<1>::
serial_invoke(const ValueType *__restrict__ A,
const int n,
/**/ ValueType *__restrict__ B) {
serial_invoke(const ValueType *__restrict__ /* A */,
const int /* n */,
/**/ ValueType *__restrict__ /* B */) {
return 0;
}

Expand Down Expand Up @@ -1366,7 +1366,7 @@ namespace KokkosBatched {
inv_a_00 = static_cast<ValueType>(1.0)/A[0*_as0+0*_as1];

auto trsv = [&](const int p,
ValueType &b_0p) {
ValueType &/* b_0p */) {
mhoemmen marked this conversation as resolved.
Show resolved Hide resolved
// 0 iteration
B[0*_bs0+p*_bs1] *= inv_a_00; /* b_0p /= a_00; */
};
Expand Down
2 changes: 1 addition & 1 deletion src/blas/impl/KokkosBlas1_nrm2w_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct MV_Nrm2w_Right_FunctorVector
typename XMV::const_type m_x, m_w;
bool m_take_sqrt;

MV_Nrm2w_Right_FunctorVector (const XMV& x, const XMV& w, const bool& take_sqrt) :
MV_Nrm2w_Right_FunctorVector (const XMV& x, const XMV& /* w */, const bool& take_sqrt) :
value_count (x.extent(1)), m_x (x), m_w (x), m_take_sqrt(take_sqrt)
{
static_assert (Kokkos::Impl::is_view<RV>::value,
Expand Down
2 changes: 1 addition & 1 deletion src/common/KokkosKernels_Handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class KokkosKernelsHandle
* \param concurrency: input, the number of threads overall. Not used currently.
* \param overall_work_size: The overall work size.
*/
int get_team_work_size(const int team_size, const int concurrency, const nnz_lno_t overall_work_size){
int get_team_work_size(const int team_size, const int /* concurrency */, const nnz_lno_t /* overall_work_size */){
if (this->team_work_size != -1) {
return this->team_work_size;
}
Expand Down
28 changes: 14 additions & 14 deletions src/common/KokkosKernels_HashmapAccumulator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ struct HashmapAccumulator
value_type value,

size_type *used_size_,
const size_type max_value_size_,
const size_type /* max_value_size_ */,
size_type *used_hash_size,
size_type *used_hashes)
{
Expand Down Expand Up @@ -344,7 +344,7 @@ struct HashmapAccumulator
key_type key,

size_type *used_size_,
const size_type max_value_size_,
const size_type /* max_value_size_ */,
size_type *used_hash_size,
size_type *used_hashes)
{
Expand Down Expand Up @@ -379,8 +379,8 @@ struct HashmapAccumulator
template <typename team_member_t>
KOKKOS_INLINE_FUNCTION
int vector_atomic_insert_into_hash_mergeAdd_TrackHashes (
const team_member_t & teamMember,
const int vector_size,
const team_member_t & /* teamMember */,
const int /* vector_size */,

size_type &hash,
const key_type key,
Expand Down Expand Up @@ -448,8 +448,8 @@ struct HashmapAccumulator
template <typename team_member_t>
KOKKOS_INLINE_FUNCTION
int vector_atomic_insert_into_hash_mergeAdd (
const team_member_t & teamMember,
const int vector_size,
const team_member_t & /* teamMember */,
const int /* vector_size */,
size_type &hash,
const key_type key,
const value_type value,
Expand Down Expand Up @@ -505,8 +505,8 @@ struct HashmapAccumulator
template <typename team_member_t>
KOKKOS_INLINE_FUNCTION
int vector_atomic_insert_into_hash (
const team_member_t & teamMember,
const int &vector_size,
const team_member_t & /* teamMember */,
const int &/* vector_size */,

const size_type &hash,
const key_type &key,
Expand Down Expand Up @@ -563,8 +563,8 @@ struct HashmapAccumulator
template <typename team_member_t>
KOKKOS_INLINE_FUNCTION
int vector_atomic_insert_into_hash_mergeOr (
const team_member_t & teamMember,
const int &vector_size,
const team_member_t & /* teamMember */,
const int &/* vector_size */,

const size_type &hash,
const key_type &key,
Expand Down Expand Up @@ -624,8 +624,8 @@ struct HashmapAccumulator
template <typename team_member_t>
KOKKOS_INLINE_FUNCTION
int vector_atomic_insert_into_hash_mergeOr_TrackHashes (
const team_member_t & teamMember,
const int &vector_size,
const team_member_t & /* teamMember */,
const int &/* vector_size */,

const size_type &hash,
const key_type &key,
Expand Down Expand Up @@ -684,8 +684,8 @@ struct HashmapAccumulator
template <typename team_member_t>
KOKKOS_INLINE_FUNCTION
int vector_atomic_insert_into_hash_TrackHashes (
const team_member_t & teamMember,
const int &vector_size,
const team_member_t & /* teamMember */,
const int &/* vector_size */,

const size_type &hash,
const key_type &key,
Expand Down
8 changes: 6 additions & 2 deletions src/common/KokkosKernels_Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ void get_suggested_vector_team_size(

suggested_team_size_ = max_allowed_team_size / suggested_vector_size_;
}
#else
(void)max_allowed_team_size;
(void)nr;
(void)nnz;
#endif

#if defined( KOKKOS_ENABLE_QTHREAD)
Expand Down Expand Up @@ -388,7 +392,7 @@ struct FillSymmetricLowerEdgesHashMap{
in_lno_nnz_view_t adj_,
hashmap_t hashmap_,
out_lno_row_view_t pre_pps_,
bool lower_only_ = false
bool /* lower_only_ */ = false
):num_rows(num_rows_),nnz(adj_.extent(0)), xadj(xadj_), adj(adj_),
umap(hashmap_), pre_pps(pre_pps_){}

Expand Down Expand Up @@ -1012,7 +1016,7 @@ void permute_block_vector(
//when really it's always the whole thing.
template <typename value_array_type, typename MyExecSpace>
void zero_vector(
typename value_array_type::value_type num_elements,
typename value_array_type::value_type /* num_elements */,
value_array_type &vector
){
typedef typename value_array_type::non_const_value_type val_type;
Expand Down
4 changes: 2 additions & 2 deletions src/graph/KokkosGraph_Distance1Color.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ template <class KernelHandle,typename lno_row_view_t_, typename lno_nnz_view_t_>
void graph_color_symbolic(
KernelHandle *handle,
typename KernelHandle::nnz_lno_t num_rows,
typename KernelHandle::nnz_lno_t num_cols,
typename KernelHandle::nnz_lno_t /* num_cols */,
lno_row_view_t_ row_map,
lno_nnz_view_t_ entries,
bool is_symmetric = true){
bool /* is_symmetric */ = true){

Kokkos::Impl::Timer timer;

Expand Down
2 changes: 1 addition & 1 deletion src/graph/impl/KokkosGraph_Distance1Color_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2599,7 +2599,7 @@ class GraphColor_VBD:public GraphColor <HandleType,lno_row_view_t_,lno_nnz_view_
: frontierSize_(frontierSize), newFrontierSize_(newFrontierSize) {}

KOKKOS_INLINE_FUNCTION
void operator() (const int dummy) const {
void operator() (const int /* dummy */) const {
frontierSize_() = newFrontierSize_();
newFrontierSize_() = 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/sparse/KokkosSparse_CrsMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ class CrsMatrix {
/// \param rows [in/out] The row map (containing the offsets to the
/// data in each row).
/// \param cols [in/out] The column indices.
CrsMatrix (const std::string& label,
CrsMatrix (const std::string& /* label */,
const OrdinalType nrows,
const OrdinalType ncols,
const size_type annz,
Expand Down Expand Up @@ -613,7 +613,7 @@ class CrsMatrix {
/// \param rows [in/out] The row map (containing the offsets to the
/// data in each row).
/// \param cols [in/out] The column indices.
CrsMatrix (const std::string& label,
CrsMatrix (const std::string& /* label */,
const OrdinalType& ncols,
const values_type& vals,
const staticcrsgraph_type& graph_) :
Expand Down
4 changes: 2 additions & 2 deletions src/sparse/impl/KokkosSparse_gauss_seidel_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ namespace KokkosSparse{
nnz_scalar_t omega;

PSGS(row_lno_persistent_work_view_t xadj_, nnz_lno_persistent_work_view_t adj_, scalar_persistent_work_view_t adj_vals_,
scalar_persistent_work_view2d_t Xvector_, scalar_persistent_work_view2d_t Yvector_, nnz_lno_persistent_work_view_t color_adj_,
scalar_persistent_work_view2d_t Xvector_, scalar_persistent_work_view2d_t Yvector_, nnz_lno_persistent_work_view_t /* color_adj_ */,
nnz_scalar_t omega_,
scalar_persistent_work_view_t permuted_inverse_diagonal_):
_xadj( xadj_),
Expand Down Expand Up @@ -580,7 +580,7 @@ namespace KokkosSparse{
});
}

size_t team_shmem_size (int team_size) const {
size_t team_shmem_size (int /* team_size */) const {
return shared_memory_size;
}
};
Expand Down
9 changes: 7 additions & 2 deletions src/sparse/impl/KokkosSparse_spgemm_CUSP_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ void CUSP_apply(
ain_nonzero_index_view_type entriesA,
ain_nonzero_value_view_type valuesA,

bool transposeA,
bool /* transposeA */,
bin_row_index_view_type row_mapB,
bin_nonzero_index_view_type entriesB,
bin_nonzero_value_view_type valuesB,
bool transposeB,
bool /* transposeB */,
cin_row_index_view_type row_mapC,
cin_nonzero_index_view_type &entriesC,
cin_nonzero_value_view_type &valuesC){
Expand Down Expand Up @@ -206,6 +206,11 @@ void CUSP_apply(
value_type>(valuesC, (value_type *) thrust::raw_pointer_cast(C.values.data())));

#else
(void)handle;
(void)m; (void)n; (void)k;
(void)row_mapA; (void)row_mapB; (void)row_mapC;
(void)entriesA; (void)entriesB; (void)entriesC;
(void)valuesA; (void)valuesB; (void)valuesC;
throw std::runtime_error ("CUSP IS NOT DEFINED\n");
//return;
#endif
Expand Down
14 changes: 12 additions & 2 deletions src/sparse/impl/KokkosSparse_spgemm_cuSPARSE_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ namespace Impl{
//return;
}
#else
(void)handle;
(void)m; (void)n; (void)k;
(void)row_mapA; (void)row_mapB; (void)row_mapC;
(void)entriesA; (void)entriesB;
(void)transposeA; (void)transposeB;
throw std::runtime_error ("CUSPARSE IS NOT DEFINED\n");
//return;
#endif
Expand Down Expand Up @@ -171,11 +176,11 @@ namespace Impl{
ain_nonzero_index_view_type entriesA,
ain_nonzero_value_view_type valuesA,

bool transposeA,
bool /* transposeA */,
bin_row_index_view_type row_mapB,
bin_nonzero_index_view_type entriesB,
bin_nonzero_value_view_type valuesB,
bool transposeB,
bool /* transposeB */,
cin_row_index_view_type row_mapC,
cin_nonzero_index_view_type entriesC,
cin_nonzero_value_view_type valuesC){
Expand Down Expand Up @@ -286,6 +291,11 @@ namespace Impl{
//return;
}
#else
(void)handle;
(void)m; (void)n; (void)k;
(void)row_mapA; (void)row_mapB; (void)row_mapC;
(void)entriesA; (void)entriesB; (void)entriesC;
(void)valuesA; (void)valuesB; (void)valuesC;
throw std::runtime_error ("CUSPARSE IS NOT DEFINED\n");
//return;
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/sparse/impl/KokkosSparse_spgemm_impl_compression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ struct KokkosSPGEMM
});
}

size_t team_shmem_size (int team_size) const {
size_t team_shmem_size (int /* team_size */) const {
return shared_memory_size;
}

Expand Down
6 changes: 3 additions & 3 deletions src/sparse/impl/KokkosSparse_spgemm_impl_kkmem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ struct KokkosSPGEMM
typedef typename std::remove_reference< decltype( *used_hash_sizes ) >::type atomic_incr_type;
Kokkos::parallel_scan(
Kokkos::ThreadVectorRange(teamMember, vector_size),
[&] (const int threadid, int &update, const bool final) {
[&] (const int /* threadid */, int &update, const bool final) {
if (final){
vector_rank = update;
}
Expand Down Expand Up @@ -1000,7 +1000,7 @@ struct KokkosSPGEMM
typedef typename std::remove_reference< decltype( *used_hash_sizes ) >::type atomic_incr_type;
Kokkos::parallel_scan(
Kokkos::ThreadVectorRange(teamMember, vector_size),
[&] (const int threadid, int &update, const bool final) {
[&] (const int /* threadid */, int &update, const bool final) {
if (final){
vector_rank = update;
}
Expand Down Expand Up @@ -1169,7 +1169,7 @@ struct KokkosSPGEMM
}


size_t team_shmem_size (int team_size) const {
size_t team_shmem_size (int /* team_size */) const {
return shared_memory_size;
}
};
Expand Down
14 changes: 7 additions & 7 deletions src/sparse/impl/KokkosSparse_spgemm_impl_seq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ template <typename KernelHandle,
void spgemm_debug_symbolic(
KernelHandle *handle,
typename KernelHandle::nnz_lno_t m,
typename KernelHandle::nnz_lno_t n,
typename KernelHandle::nnz_lno_t /* n */,
typename KernelHandle::nnz_lno_t k,
alno_row_view_t_ row_mapA,
alno_nnz_view_t_ entriesA,

bool transposeA,
bool /* transposeA */,
blno_row_view_t_ row_mapB,
blno_nnz_view_t_ entriesB,
bool transposeB,
bool /* transposeB */,
clno_row_view_t_ row_mapC
){
typename alno_row_view_t_::HostMirror h_rma = Kokkos::create_mirror_view (row_mapA);
Expand Down Expand Up @@ -151,19 +151,19 @@ template <typename KernelHandle,
typename clno_nnz_view_t_,
typename cscalar_nnz_view_t_>
void spgemm_debug_numeric(
KernelHandle *handle,
KernelHandle * /* handle */,
typename KernelHandle::nnz_lno_t m,
typename KernelHandle::nnz_lno_t n,
typename KernelHandle::nnz_lno_t /* n */,
typename KernelHandle::nnz_lno_t k,
alno_row_view_t_ row_mapA,
alno_nnz_view_t_ entriesA,
ascalar_nnz_view_t_ valuesA,

bool transposeA,
bool /* transposeA */,
blno_row_view_t_ row_mapB,
blno_nnz_view_t_ entriesB,
bscalar_nnz_view_t_ valuesB,
bool transposeB,
bool /* transposeB */,
clno_row_view_t_ row_mapC,
clno_nnz_view_t_ entriesC,
cscalar_nnz_view_t_ valuesC
Expand Down
Loading