Skip to content

Commit 5144ab2

Browse files
committed
remove double apis
1 parent 2399406 commit 5144ab2

File tree

3 files changed

+0
-107
lines changed

3 files changed

+0
-107
lines changed

cpp/include/cuvs/preprocessing/pca.hpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,6 @@ void fit(raft::resources const& handle,
107107
raft::device_scalar_view<float, int64_t> noise_vars,
108108
bool flip_signs_based_on_U = false);
109109

110-
void fit(raft::resources const& handle,
111-
const params& config,
112-
raft::device_matrix_view<double, int64_t, raft::col_major> input,
113-
raft::device_matrix_view<double, int64_t, raft::col_major> components,
114-
raft::device_vector_view<double, int64_t> explained_var,
115-
raft::device_vector_view<double, int64_t> explained_var_ratio,
116-
raft::device_vector_view<double, int64_t> singular_vals,
117-
raft::device_vector_view<double, int64_t> mu,
118-
raft::device_scalar_view<double, int64_t> noise_vars,
119-
bool flip_signs_based_on_U = false);
120-
121110
/**
122111
* @brief Perform PCA fit and transform operations.
123112
*
@@ -148,18 +137,6 @@ void fit_transform(raft::resources const& handle,
148137
raft::device_scalar_view<float, int64_t> noise_vars,
149138
bool flip_signs_based_on_U = false);
150139

151-
void fit_transform(raft::resources const& handle,
152-
const params& config,
153-
raft::device_matrix_view<double, int64_t, raft::col_major> input,
154-
raft::device_matrix_view<double, int64_t, raft::col_major> trans_input,
155-
raft::device_matrix_view<double, int64_t, raft::col_major> components,
156-
raft::device_vector_view<double, int64_t> explained_var,
157-
raft::device_vector_view<double, int64_t> explained_var_ratio,
158-
raft::device_vector_view<double, int64_t> singular_vals,
159-
raft::device_vector_view<double, int64_t> mu,
160-
raft::device_scalar_view<double, int64_t> noise_vars,
161-
bool flip_signs_based_on_U = false);
162-
163140
/**
164141
* @brief Perform PCA transform operation.
165142
*
@@ -182,14 +159,6 @@ void transform(raft::resources const& handle,
182159
raft::device_vector_view<float, int64_t> mu,
183160
raft::device_matrix_view<float, int64_t, raft::col_major> trans_input);
184161

185-
void transform(raft::resources const& handle,
186-
const params& config,
187-
raft::device_matrix_view<double, int64_t, raft::col_major> input,
188-
raft::device_matrix_view<double, int64_t, raft::col_major> components,
189-
raft::device_vector_view<double, int64_t> singular_vals,
190-
raft::device_vector_view<double, int64_t> mu,
191-
raft::device_matrix_view<double, int64_t, raft::col_major> trans_input);
192-
193162
/**
194163
* @brief Perform PCA inverse transform operation.
195164
*
@@ -211,14 +180,6 @@ void inverse_transform(raft::resources const& handle,
211180
raft::device_vector_view<float, int64_t> mu,
212181
raft::device_matrix_view<float, int64_t, raft::col_major> output);
213182

214-
void inverse_transform(raft::resources const& handle,
215-
const params& config,
216-
raft::device_matrix_view<double, int64_t, raft::col_major> trans_input,
217-
raft::device_matrix_view<double, int64_t, raft::col_major> components,
218-
raft::device_vector_view<double, int64_t> singular_vals,
219-
raft::device_vector_view<double, int64_t> mu,
220-
raft::device_matrix_view<double, int64_t, raft::col_major> output);
221-
222183
/** @} */ // end group pca
223184

224185
} // namespace cuvs::preprocessing::pca

cpp/src/preprocessing/pca/pca.cu

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ namespace cuvs::preprocessing::pca {
3434
}
3535

3636
CUVS_INST_PCA_FIT(float, int64_t);
37-
CUVS_INST_PCA_FIT(double, int64_t);
3837
#undef CUVS_INST_PCA_FIT
3938

4039
#define CUVS_INST_PCA_FIT_TRANSFORM(DataT, IndexT) \
@@ -64,7 +63,6 @@ CUVS_INST_PCA_FIT(double, int64_t);
6463
}
6564

6665
CUVS_INST_PCA_FIT_TRANSFORM(float, int64_t);
67-
CUVS_INST_PCA_FIT_TRANSFORM(double, int64_t);
6866
#undef CUVS_INST_PCA_FIT_TRANSFORM
6967

7068
#define CUVS_INST_PCA_TRANSFORM(DataT, IndexT) \
@@ -80,7 +78,6 @@ CUVS_INST_PCA_FIT_TRANSFORM(double, int64_t);
8078
}
8179

8280
CUVS_INST_PCA_TRANSFORM(float, int64_t);
83-
CUVS_INST_PCA_TRANSFORM(double, int64_t);
8481
#undef CUVS_INST_PCA_TRANSFORM
8582

8683
#define CUVS_INST_PCA_INVERSE_TRANSFORM(DataT, IndexT) \
@@ -96,7 +93,6 @@ CUVS_INST_PCA_TRANSFORM(double, int64_t);
9693
}
9794

9895
CUVS_INST_PCA_INVERSE_TRANSFORM(float, int64_t);
99-
CUVS_INST_PCA_INVERSE_TRANSFORM(double, int64_t);
10096
#undef CUVS_INST_PCA_INVERSE_TRANSFORM
10197

10298
} // namespace cuvs::preprocessing::pca

cpp/tests/preprocessing/pca.cu

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,6 @@ const std::vector<PcaInputs<float>> inputsf2 = {
206206
{0.01f, 3 * 2, 3, 2, 1024 * 128, 1024, 128, 1234ULL, 0},
207207
{0.01f, 3 * 2, 3, 2, 256 * 32, 256, 32, 1234ULL, 1}};
208208

209-
const std::vector<PcaInputs<double>> inputsd2 = {
210-
{0.01, 3 * 2, 3, 2, 1024 * 128, 1024, 128, 1234ULL, 0},
211-
{0.01, 3 * 2, 3, 2, 256 * 32, 256, 32, 1234ULL, 1}};
212-
213209
typedef PcaTest<float> PcaTestValF;
214210
TEST_P(PcaTestValF, Result)
215211
{
@@ -220,16 +216,6 @@ TEST_P(PcaTestValF, Result)
220216
raft::resource::get_cuda_stream(handle)));
221217
}
222218

223-
typedef PcaTest<double> PcaTestValD;
224-
TEST_P(PcaTestValD, Result)
225-
{
226-
ASSERT_TRUE(devArrMatch(explained_vars.data(),
227-
explained_vars_ref.data(),
228-
params.n_col,
229-
cuvs::CompareApprox<double>(params.tolerance),
230-
raft::resource::get_cuda_stream(handle)));
231-
}
232-
233219
typedef PcaTest<float> PcaTestLeftVecF;
234220
TEST_P(PcaTestLeftVecF, Result)
235221
{
@@ -240,16 +226,6 @@ TEST_P(PcaTestLeftVecF, Result)
240226
raft::resource::get_cuda_stream(handle)));
241227
}
242228

243-
typedef PcaTest<double> PcaTestLeftVecD;
244-
TEST_P(PcaTestLeftVecD, Result)
245-
{
246-
ASSERT_TRUE(devArrMatch(components.data(),
247-
components_ref.data(),
248-
(params.n_col * params.n_col),
249-
cuvs::CompareApprox<double>(params.tolerance),
250-
raft::resource::get_cuda_stream(handle)));
251-
}
252-
253229
typedef PcaTest<float> PcaTestTransDataF;
254230
TEST_P(PcaTestTransDataF, Result)
255231
{
@@ -260,16 +236,6 @@ TEST_P(PcaTestTransDataF, Result)
260236
raft::resource::get_cuda_stream(handle)));
261237
}
262238

263-
typedef PcaTest<double> PcaTestTransDataD;
264-
TEST_P(PcaTestTransDataD, Result)
265-
{
266-
ASSERT_TRUE(devArrMatch(trans_data.data(),
267-
trans_data_ref.data(),
268-
(params.n_row * params.n_col),
269-
cuvs::CompareApprox<double>(params.tolerance),
270-
raft::resource::get_cuda_stream(handle)));
271-
}
272-
273239
typedef PcaTest<float> PcaTestDataVecSmallF;
274240
TEST_P(PcaTestDataVecSmallF, Result)
275241
{
@@ -280,16 +246,6 @@ TEST_P(PcaTestDataVecSmallF, Result)
280246
raft::resource::get_cuda_stream(handle)));
281247
}
282248

283-
typedef PcaTest<double> PcaTestDataVecSmallD;
284-
TEST_P(PcaTestDataVecSmallD, Result)
285-
{
286-
ASSERT_TRUE(devArrMatch(data.data(),
287-
data_back.data(),
288-
(params.n_row * params.n_col),
289-
cuvs::CompareApprox<double>(params.tolerance),
290-
raft::resource::get_cuda_stream(handle)));
291-
}
292-
293249
typedef PcaTest<float> PcaTestDataVecF;
294250
TEST_P(PcaTestDataVecF, Result)
295251
{
@@ -300,34 +256,14 @@ TEST_P(PcaTestDataVecF, Result)
300256
raft::resource::get_cuda_stream(handle)));
301257
}
302258

303-
typedef PcaTest<double> PcaTestDataVecD;
304-
TEST_P(PcaTestDataVecD, Result)
305-
{
306-
ASSERT_TRUE(devArrMatch(data2.data(),
307-
data2_back.data(),
308-
(params.n_row2 * params.n_col2),
309-
cuvs::CompareApprox<double>(params.tolerance),
310-
raft::resource::get_cuda_stream(handle)));
311-
}
312-
313259
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestValF, ::testing::ValuesIn(inputsf2));
314260

315-
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestValD, ::testing::ValuesIn(inputsd2));
316-
317261
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestLeftVecF, ::testing::ValuesIn(inputsf2));
318262

319-
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestLeftVecD, ::testing::ValuesIn(inputsd2));
320-
321263
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestDataVecSmallF, ::testing::ValuesIn(inputsf2));
322264

323-
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestDataVecSmallD, ::testing::ValuesIn(inputsd2));
324-
325265
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestTransDataF, ::testing::ValuesIn(inputsf2));
326266

327-
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestTransDataD, ::testing::ValuesIn(inputsd2));
328-
329267
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestDataVecF, ::testing::ValuesIn(inputsf2));
330268

331-
INSTANTIATE_TEST_CASE_P(PcaTests, PcaTestDataVecD, ::testing::ValuesIn(inputsd2));
332-
333269
} // end namespace cuvs::preprocessing::pca

0 commit comments

Comments
 (0)