Skip to content

Commit

Permalink
split daal exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev committed Sep 24, 2024
1 parent c51600a commit 6ac30a9
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ using namespace daal::services;
* \param[in] method Computation method for the algorithm
*/
template <typename algorithmFPType>
DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method)
Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method)
{
const Input * const in = static_cast<const Input *>(input);

Expand All @@ -57,8 +57,7 @@ DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * in
return s;
}

template DAAL_EXPORT services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, const Parameter * parameter,
const int method);
template services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, const Parameter * parameter, const int method);

} // namespace training
} // namespace elastic_net
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ using namespace daal::services;
* \param[in] method Computation method for the algorithm
*/
template <typename algorithmFPType>
DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method)
Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method)
{
const Input * const in = static_cast<const Input *>(input);

Expand All @@ -57,8 +57,7 @@ DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * in
return s;
}

template DAAL_EXPORT services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, const Parameter * parameter,
const int method);
template services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, const Parameter * parameter, const int method);

} // namespace training
} // namespace lasso_regression
Expand Down
5 changes: 2 additions & 3 deletions cpp/daal/src/algorithms/normalization/zscore/zscore_fpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace interface2
* \param[in] method Algorithm computation method
*/
template <typename algorithmFPType>
DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method)
Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method)
{
auto impl = ResultImpl::cast(getStorage(*this));
DAAL_CHECK(impl, ErrorNullPtr);
Expand All @@ -62,8 +62,7 @@ Status Result::allocate(const daal::algorithms::Input * input, const int method)
}

template Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, const int method);
template DAAL_EXPORT services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter, const int method);
template Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method);

} // namespace interface2
} // namespace zscore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ namespace algorithms
{
namespace pca
{
template DAAL_EXPORT services::Status PartialResult<correlationDense>::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter,
const int method);
template DAAL_EXPORT services::Status PartialResult<correlationDense>::initialize<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter,
const int method);
template services::Status PartialResult<correlationDense>::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter, const int method);
template services::Status PartialResult<correlationDense>::initialize<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter, const int method);

} // namespace pca
} // namespace algorithms
Expand Down
8 changes: 4 additions & 4 deletions cpp/daal/src/algorithms/pca/pca_partialresult_svd.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ namespace pca
* \param[in] method Computation method
*/
template <typename algorithmFPType>
DAAL_EXPORT services::Status PartialResult<svdDense>::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter,
const int method)
services::Status PartialResult<svdDense>::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter,
const int method)
{
services::Status s;
set(nObservationsSVD, HomogenNumericTable<algorithmFPType>::create(1, 1, NumericTableIface::doAllocate, 0, &s));
Expand All @@ -55,8 +55,8 @@ DAAL_EXPORT services::Status PartialResult<svdDense>::allocate(const daal::algor
};

template <typename algorithmFPType>
DAAL_EXPORT services::Status PartialResult<svdDense>::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter,
const int method)
services::Status PartialResult<svdDense>::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter,
const int method)
{
services::Status s;
DAAL_CHECK_STATUS(s, get(nObservationsSVD)->assign((algorithmFPType)0.0))
Expand Down
9 changes: 4 additions & 5 deletions cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ namespace algorithms
{
namespace pca
{
template DAAL_EXPORT services::Status PartialResult<svdDense>::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter, const int method);
template DAAL_EXPORT services::Status PartialResult<svdDense>::initialize<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter,
const int method);
template services::Status PartialResult<svdDense>::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter, const int method);
template services::Status PartialResult<svdDense>::initialize<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter, const int method);

} // namespace pca
} // namespace algorithms
Expand Down
7 changes: 3 additions & 4 deletions cpp/daal/src/algorithms/pca/pca_result_fpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * in
* \param[in] method Computation method
*/
template <typename algorithmFPType>
DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter,
const Method method)
services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const Method method)
{
size_t nComponents = 0;
DAAL_UINT64 resultsToCompute = eigenvalue;
Expand All @@ -77,8 +76,8 @@ DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::PartialRes

template DAAL_EXPORT services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter,
const Method method);
template DAAL_EXPORT services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::PartialResult * partialResult,
daal::algorithms::Parameter * parameter, const Method method);
template services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::PartialResult * partialResult,
daal::algorithms::Parameter * parameter, const Method method);

} // namespace interface3
} // namespace pca
Expand Down
5 changes: 2 additions & 3 deletions cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ namespace interface1
* Allocates memory to store partial results of the SVD algorithm
*/
template <typename algorithmFPType>
DAAL_EXPORT services::Status DistributedPartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter,
const int method)
Status DistributedPartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method)
{
set(outputOfStep2ForStep3, KeyValueDataCollectionPtr(new KeyValueDataCollection()));
Argument::set(finalResultFromStep2Master, ResultPtr(new Result()));
Expand All @@ -62,7 +61,7 @@ DAAL_EXPORT services::Status DistributedPartialResult::allocate(const daal::algo
* \param[out] nBlocks Number of rows in the input data set
*/
template <typename algorithmFPType>
DAAL_EXPORT services::Status DistributedPartialResult::setPartialResultStorage(KeyValueDataCollection * inCollection, size_t & nBlocks)
Status DistributedPartialResult::setPartialResultStorage(KeyValueDataCollection * inCollection, size_t & nBlocks)
{
KeyValueDataCollectionPtr partialCollection = staticPointerCast<KeyValueDataCollection, SerializationIface>(Argument::get(outputOfStep2ForStep3));
if (!partialCollection)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ namespace svd
{
namespace interface1
{
template DAAL_EXPORT services::Status DistributedPartialResult::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter,
const int method);
template DAAL_EXPORT services::Status DistributedPartialResult::setPartialResultStorage<DAAL_FPTYPE>(
data_management::KeyValueDataCollection * inCollection, size_t & nBlocks);
template services::Status DistributedPartialResult::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter, const int method);
template services::Status DistributedPartialResult::setPartialResultStorage<DAAL_FPTYPE>(data_management::KeyValueDataCollection * inCollection,
size_t & nBlocks);

} // namespace interface1
} // namespace svd
Expand Down
5 changes: 2 additions & 3 deletions cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ namespace interface1
* \param[in] method Algorithm computation method
*/
template <typename algorithmFPType>
DAAL_EXPORT services::Status DistributedPartialResultStep3::allocate(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter, const int method)
Status DistributedPartialResultStep3::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method)
{
Argument::set(finalResultFromStep3, ResultPtr(new Result()));
return Status();
Expand All @@ -55,7 +54,7 @@ DAAL_EXPORT services::Status DistributedPartialResultStep3::allocate(const daal:
* \param[in] qCollection DataCollection of all partial results from step 1 of the SVD algorithm in the distributed processing mode
*/
template <typename algorithmFPType>
DAAL_EXPORT services::Status DistributedPartialResultStep3::setPartialResultStorage(data_management::DataCollection * qCollection)
Status DistributedPartialResultStep3::setPartialResultStorage(data_management::DataCollection * qCollection)
{
size_t qSize = qCollection->size();
size_t m = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ namespace svd
{
namespace interface1
{
template DAAL_EXPORT services::Status DistributedPartialResultStep3::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter,
const int method);
template DAAL_EXPORT services::Status DistributedPartialResultStep3::setPartialResultStorage<DAAL_FPTYPE>(
data_management::DataCollection * qCollection);
template services::Status DistributedPartialResultStep3::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input,
const daal::algorithms::Parameter * parameter, const int method);
template services::Status DistributedPartialResultStep3::setPartialResultStorage<DAAL_FPTYPE>(data_management::DataCollection * qCollection);

} // namespace interface1
} // namespace svd
Expand Down

0 comments on commit 6ac30a9

Please sign in to comment.