Skip to content

Commit

Permalink
fix: adding daal exports for vc compiler (#2910)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev authored Sep 24, 2024
1 parent 2774879 commit af53117
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 32 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>
Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method)
DAAL_EXPORT services::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,7 +57,8 @@ Status Result::allocate(const daal::algorithms::Input * input, const Parameter *
return s;
}

template services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, const Parameter * parameter, const int method);
template DAAL_EXPORT 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>
Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method)
DAAL_EXPORT services::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,7 +57,8 @@ Status Result::allocate(const daal::algorithms::Input * input, const Parameter *
return s;
}

template services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, const Parameter * parameter, const int method);
template DAAL_EXPORT 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: 3 additions & 2 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>
Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method)
DAAL_EXPORT services::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 @@ -61,8 +61,9 @@ Status Result::allocate(const daal::algorithms::Input * input, const int method)
return allocate<algorithmFPType>(input, NULL, 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 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,10 +29,12 @@ namespace algorithms
{
namespace pca
{
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);
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);

} // 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>
services::Status PartialResult<svdDense>::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter,
const int method)
DAAL_EXPORT 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 @@ services::Status PartialResult<svdDense>::allocate(const daal::algorithms::Input
};

template <typename algorithmFPType>
services::Status PartialResult<svdDense>::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter,
const int method)
DAAL_EXPORT 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: 5 additions & 4 deletions cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ namespace algorithms
{
namespace pca
{
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);
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);

} // namespace pca
} // namespace algorithms
Expand Down
7 changes: 4 additions & 3 deletions cpp/daal/src/algorithms/pca/pca_result_fpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * in
* \param[in] method Computation method
*/
template <typename algorithmFPType>
services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const Method method)
DAAL_EXPORT 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 @@ -76,8 +77,8 @@ services::Status Result::allocate(const daal::algorithms::PartialResult * partia

template DAAL_EXPORT services::Status Result::allocate<DAAL_FPTYPE>(const daal::algorithms::Input * input, 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);
template DAAL_EXPORT 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: 3 additions & 2 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,7 +41,8 @@ namespace interface1
* Allocates memory to store partial results of the SVD algorithm
*/
template <typename algorithmFPType>
Status DistributedPartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method)
DAAL_EXPORT services::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 @@ -61,7 +62,7 @@ Status DistributedPartialResult::allocate(const daal::algorithms::Input * input,
* \param[out] nBlocks Number of rows in the input data set
*/
template <typename algorithmFPType>
Status DistributedPartialResult::setPartialResultStorage(KeyValueDataCollection * inCollection, size_t & nBlocks)
DAAL_EXPORT services::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,10 +30,11 @@ namespace svd
{
namespace interface1
{
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);
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);

} // namespace interface1
} // namespace svd
Expand Down
5 changes: 3 additions & 2 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,7 +42,8 @@ namespace interface1
* \param[in] method Algorithm computation method
*/
template <typename algorithmFPType>
Status DistributedPartialResultStep3::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method)
DAAL_EXPORT services::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 @@ -54,7 +55,7 @@ Status DistributedPartialResultStep3::allocate(const daal::algorithms::Input * i
* \param[in] qCollection DataCollection of all partial results from step 1 of the SVD algorithm in the distributed processing mode
*/
template <typename algorithmFPType>
Status DistributedPartialResultStep3::setPartialResultStorage(data_management::DataCollection * qCollection)
DAAL_EXPORT services::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,9 +30,11 @@ namespace svd
{
namespace interface1
{
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);
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);

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

0 comments on commit af53117

Please sign in to comment.