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

Fix GCC build errors in PCA example #3037

Merged
merged 2 commits into from
Jan 10, 2025
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
14 changes: 11 additions & 3 deletions cpp/daal/include/algorithms/algorithm_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,17 @@ class DAAL_EXPORT Argument

protected:
/**
* Copy constructor
* \param[in] other Instance of the same class to copy
*/
* Copy constructor
* \param[in] other Instance of the same class to copy
*/
Argument(const Argument & other);

/**
* Copy assignment operator
* \param[in] other Instance of the same class to copy
*/
Argument & operator=(const Argument & other);

/**
* Retrieves specified element
* \param[in] index Index of the element
Expand Down Expand Up @@ -326,6 +332,8 @@ class Input : public Argument
* \param[in] other Instance of the same class to copy
*/
Input(const Input & other) : Argument(other) {}

Input & operator=(const Input & other) = default;
};

/**
Expand Down
14 changes: 14 additions & 0 deletions cpp/daal/include/data_management/data/data_dictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,25 @@ class NumericTableFeature : public SerializationIface
categoryNumber = 0;
}

/**
* Copy constructor for a data feature
*/
NumericTableFeature(const NumericTableFeature & f)
{
indexType = f.indexType;
pmmlType = f.pmmlType;
featureType = f.featureType;
typeSize = f.typeSize;
categoryNumber = f.categoryNumber;
}

/**
* Copy operator for a data feature
*/
NumericTableFeature & operator=(const NumericTableFeature & f)
{
if (this == &f) return *this;

indexType = f.indexType;
pmmlType = f.pmmlType;
featureType = f.featureType;
Expand Down
8 changes: 8 additions & 0 deletions cpp/daal/src/algorithms/algorithm_base_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ algorithms::Argument::Argument(const algorithms::Argument & other)
: _storage(new internal::ArgumentStorage(*(internal::ArgumentStorage *)other._storage.get())), idx(0)
{}

algorithms::Argument & algorithms::Argument::operator=(const algorithms::Argument & other)
{
if (this == &other) return *this;
_storage = data_management::DataCollectionPtr(new internal::ArgumentStorage(*(internal::ArgumentStorage *)other._storage.get()));
idx = 0;
return *this;
}

const data_management::SerializationIfacePtr & algorithms::Argument::get(size_t index) const
{
return (*_storage)[index];
Expand Down
Loading