C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 4

sql/internal/default_modifiers.h
1 /* file: default_modifiers.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 #ifndef __DATA_SOURCE_MODIFIERS_SQL_DEFAULT_MODIFIERS_H__
17 #define __DATA_SOURCE_MODIFIERS_SQL_DEFAULT_MODIFIERS_H__
18 
19 #include "services/daal_shared_ptr.h"
20 #include "services/internal/collection.h"
21 
22 #include "data_management/features/defines.h"
23 #include "data_management/data_source/modifiers/sql/modifier.h"
24 
25 namespace daal
26 {
27 namespace data_management
28 {
29 namespace modifiers
30 {
31 namespace sql
32 {
33 namespace internal
34 {
35 
40 class ContinuousFeatureModifier : public FeatureModifier
41 {
42 public:
43  virtual void initialize(Config &config) DAAL_C11_OVERRIDE
44  {
45  const size_t numberOfFeatures = config.getNumberOfInputFeatures();
46  for (size_t i = 0; i < numberOfFeatures; i++)
47  {
48  config.setOutputFeatureType(i, features::DAAL_CONTINUOUS);
49  }
50  }
51 
52  virtual void apply(Context &context) DAAL_C11_OVERRIDE
53  {
54  services::BufferView<DAAL_DATA_TYPE> outputBuffer = context.getOutputBuffer();
55  for (size_t i = 0; i < outputBuffer.size(); i++)
56  {
57  outputBuffer[i] = context.getValue<DAAL_DATA_TYPE>(i);
58  }
59  }
60 };
61 
62 } // namespace internal
63 } // namespace sql
64 } // namespace modifiers
65 } // namespace data_management
66 } // namespace daal
67 
68 #endif
daal
Definition: algorithm_base_common.h:31
daal::data_management::modifiers::sql::internal::ContinuousFeatureModifier
Feature modifier that parses tokens as continuous features.
Definition: sql/internal/default_modifiers.h:40

For more complete information about compiler optimizations, see our Optimization Notice.