C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

odbc_data_source.h
1 /* file: odbc_data_source.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Implementation of the ODBC data source class
21 //--
22 */
23 #ifndef __ODBC_DATA_SOURCE_H__
24 #define __ODBC_DATA_SOURCE_H__
25 
26 #include <string>
27 
28 #include <sql.h>
29 #include <sqltypes.h>
30 #include <sqlext.h>
31 
32 #include "services/daal_memory.h"
33 
34 #include "data_management/data_source/data_source.h"
35 #include "data_management/data/data_dictionary.h"
36 #include "data_management/data/numeric_table.h"
37 #include "data_management/data/homogen_numeric_table.h"
38 #include "data_management/data_source/mysql_feature_manager.h"
39 #include "data_management/data_source/internal/data_source_options.h"
40 
41 namespace daal
42 {
43 namespace data_management
44 {
45 
49 namespace interface1
50 {
60 class ODBCDataSourceOptions
61 {
62 public:
63  enum Value
64  {
65  byDefault = 0,
66  allocateNumericTable = 1 << 0,
67  createDictionaryFromContext = 1 << 1
68  };
69 
70  static ODBCDataSourceOptions::Value unite(const ODBCDataSourceOptions::Value &lhs,
71  const ODBCDataSourceOptions::Value &rhs)
72  {
73  return internal::DataSourceOptionsImpl<Value>::unite(lhs, rhs);
74  }
75 
76  ODBCDataSourceOptions(Value flags = byDefault) :
77  _impl(flags) { }
78 
79  DataSource::NumericTableAllocationFlag getNumericTableAllocationFlag() const
80  {
81  return (_impl.getFlag(allocateNumericTable))
82  ? DataSource::doAllocateNumericTable
83  : DataSource::notAllocateNumericTable;
84  }
85 
86  DataSource::DictionaryCreationFlag getDictionaryCreationFlag() const
87  {
88  return (_impl.getFlag(createDictionaryFromContext))
89  ? DataSource::doDictionaryFromContext
90  : DataSource::notDictionaryFromContext;
91  }
92 
93 private:
94  internal::DataSourceOptionsImpl<Value> _impl;
95 };
96 
103 template<typename FeatureManager, typename SummaryStatisticsType = DAAL_SUMMARY_STATISTICS_TYPE>
104 class ODBCDataSource : public DataSourceTemplate<data_management::HomogenNumericTable<DAAL_DATA_TYPE>, SummaryStatisticsType>
105 {
106 private:
107  typedef data_management::HomogenNumericTable<DAAL_DATA_TYPE> DefaultNumericTableType;
108  typedef DataSourceTemplate<DefaultNumericTableType, SummaryStatisticsType> super;
109 
110 protected:
111  using super::_dict;
112  using super::_spnt;
113  using super::_initialMaxRows;
114  using super::_autoNumericTableFlag;
115  using super::_autoDictionaryFlag;
116  using super::_status;
117 
118 public:
132  ODBCDataSource(const std::string &dbname,
133  const std::string &tableName = "",
134  const std::string &userName = "",
135  const std::string &password = "",
136  DataSourceIface::NumericTableAllocationFlag doAllocateNumericTable = DataSource::notAllocateNumericTable,
137  DataSourceIface::DictionaryCreationFlag doCreateDictionaryFromContext = DataSource::notDictionaryFromContext,
138  size_t initialMaxRows = 10) :
139  super(doAllocateNumericTable,
140  doCreateDictionaryFromContext)
141  {
142  if (dbname.find('\0') != std::string::npos || tableName.find('\0') != std::string::npos ||
143  userName.find('\0') != std::string::npos || password.find('\0') != std::string::npos)
144  {
145  this->_status.add(services::throwIfPossible(services::ErrorNullByteInjection));
146  return;
147  }
148  initialize(initialMaxRows);
149  _status |= connectUsingUserNameAndPassword(dbname, userName, password);
150  if (!_status) { return; }
151  _status |= executeSelectAllQuery(tableName);
152  }
153 
164  ODBCDataSource(const std::string &dbname,
165  const std::string &tableName,
166  const std::string &userName,
167  const std::string &password,
168  const ODBCDataSourceOptions &options,
169  size_t initialMaxRows = 10) :
170  super(options.getNumericTableAllocationFlag(),
171  options.getDictionaryCreationFlag())
172  {
173  if (dbname.find('\0') != std::string::npos || tableName.find('\0') != std::string::npos ||
174  userName.find('\0') != std::string::npos || password.find('\0') != std::string::npos)
175  {
176  this->_status.add(services::throwIfPossible(services::ErrorNullByteInjection));
177  return;
178  }
179  initialize(initialMaxRows);
180  _status |= connectUsingUserNameAndPassword(dbname, userName, password);
181  if (!_status) { return; }
182  _status |= executeSelectAllQuery(tableName);
183  }
184 
192  ODBCDataSource(const std::string &connectionString,
193  const ODBCDataSourceOptions &options,
194  size_t initialMaxRows = 10) :
195  super(options.getNumericTableAllocationFlag(),
196  options.getDictionaryCreationFlag())
197  {
198  if (connectionString.find('\0') != std::string::npos)
199  {
200  this->_status.add(services::throwIfPossible(services::ErrorNullByteInjection));
201  return;
202  }
203  initialize(initialMaxRows);
204  _status |= connectUsingConnectionString(connectionString);
205  }
206 
207  virtual ~ODBCDataSource()
208  {
209  freeHandlesInternal();
210  }
211 
212  services::Status executeQuery(const std::string &query)
213  {
214  if (query.find('\0') != std::string::npos)
215  {
216  this->_status.add(services::throwIfPossible(services::ErrorNullByteInjection));
217  return _status;
218  }
219  _idxLastRead = 0;
220 
221  if (_autoNumericTableFlag == DataSource::doAllocateNumericTable)
222  { _spnt.reset(); }
223 
224  if (_autoDictionaryFlag == DataSource::doDictionaryFromContext)
225  { _dict.reset(); }
226 
227  if (_hdlStmt)
228  {
229  SQLRETURN ret = SQLFreeHandle(SQL_HANDLE_STMT, _hdlStmt);
230  if (!SQL_SUCCEEDED(ret)) { return services::throwIfPossible(services::ErrorSQLstmtHandle); }
231  _hdlStmt = SQL_NULL_HSTMT;
232  }
233 
234  SQLRETURN ret = SQLAllocHandle(SQL_HANDLE_STMT, _hdlDbc, &_hdlStmt);
235  if (!SQL_SUCCEEDED(ret)) { return services::throwIfPossible(services::ErrorSQLstmtHandle); }
236 
237  ret = SQLExecDirect(_hdlStmt, (SQLCHAR *)query.c_str(), SQL_NTS);
238  if (!SQL_SUCCEEDED(ret)) { return services::throwIfPossible(services::ErrorODBC); }
239 
240  _connectionStatus = DataSource::readyForLoad;
241  return services::Status();
242  }
243 
247  services::Status freeHandles()
248  {
249  SQLRETURN ret = freeHandlesInternal();
250  if (!SQL_SUCCEEDED(ret)) { return services::throwIfPossible(services::ErrorODBC); }
251 
252  _connectionStatus = DataSource::notReady;
253  return services::Status();
254  }
255 
256  virtual size_t loadDataBlock(size_t maxRows) DAAL_C11_OVERRIDE
257  {
258  services::Status s = checkConnection();
259  if (!s) { return 0; }
260 
261  s = super::checkDictionary();
262  if (!s) { return 0; }
263 
264  s = super::checkNumericTable();
265  if (!s) { return 0; }
266 
267  return loadDataBlock(maxRows, _spnt.get());
268  }
269 
276  virtual size_t loadDataBlock(size_t maxRows, NumericTable *nt)
277  {
278  services::Status s = checkConnection();
279  if(!s) { return 0; }
280 
281  s = super::checkDictionary();
282  if(!s) { return 0; }
283 
284  if( nt == NULL ) { this->_status.add(services::throwIfPossible(services::ErrorNullInputNumericTable)); return 0; }
285 
286  super::resizeNumericTableImpl( maxRows, nt );
287 
288  if(nt->getDataMemoryStatus() == NumericTableIface::userAllocated)
289  {
290  if(nt->getNumberOfRows() < maxRows)
291  {
292  this->_status.add(services::throwIfPossible(services::ErrorIncorrectNumberOfObservations));
293  return 0;
294  }
295  if(nt->getNumberOfColumns() != _dict->getNumberOfFeatures())
296  {
297  this->_status.add(services::throwIfPossible(services::ErrorIncorrectNumberOfFeatures));
298  return 0;
299  }
300  }
301 
302  _connectionStatus = _featureManager.statementResultsNumericTable(_hdlStmt, nt, maxRows);
303 
304  size_t nRead = nt->getNumberOfRows();
305  _idxLastRead += nRead;
306 
307  if(nt->basicStatistics.get(NumericTableIface::minimum ).get() != NULL &&
308  nt->basicStatistics.get(NumericTableIface::maximum ).get() != NULL &&
309  nt->basicStatistics.get(NumericTableIface::sum ).get() != NULL &&
310  nt->basicStatistics.get(NumericTableIface::sumSquares).get() != NULL)
311  {
312  for(size_t i = 0; i < nRead; i++)
313  {
314  super::updateStatistics( i, nt );
315  }
316  }
317 
318  NumericTableDictionaryPtr ntDict = nt->getDictionarySharedPtr();
319  size_t nFeatures = _dict->getNumberOfFeatures();
320  ntDict->setNumberOfFeatures(nFeatures);
321  for (size_t i = 0; i < nFeatures; i++)
322  {
323  ntDict->setFeature((*_dict)[i].ntFeature, i);
324  }
325 
326  return nRead;
327  }
328 
329  size_t loadDataBlock() DAAL_C11_OVERRIDE
330  {
331  services::Status s;
332 
333  s = checkConnection();
334  if(!s) { return 0; }
335 
336  s = super::checkDictionary();
337  if(!s) { return 0; }
338 
339  s = super::checkNumericTable();
340  if(!s) { return 0; }
341 
342  return loadDataBlock(_spnt.get());
343  }
344 
345  size_t loadDataBlock(NumericTable* nt) DAAL_C11_OVERRIDE
346  {
347  services::Status s;
348 
349  s = checkConnection();
350  if(!s) { return 0; }
351 
352  s = super::checkDictionary();
353  if(!s) { return 0; }
354 
355  if( nt == NULL ) {this->_status.add(services::throwIfPossible(services::ErrorNullInputNumericTable)); return 0; }
356 
357  size_t maxRows = (_initialMaxRows > 0 ? _initialMaxRows : 10);
358  size_t nrows = 0;
359  size_t ncols = _dict->getNumberOfFeatures();
360 
361  DataCollection tables;
362 
363  for( ; ; )
364  {
365  NumericTablePtr ntCurrent = HomogenNumericTable<DAAL_DATA_TYPE>::create(ncols, maxRows, NumericTableIface::doAllocate, &s);
366  if (!s)
367  {
368  this->_status.add(services::throwIfPossible(services::ErrorNumericTableNotAllocated));
369  break;
370  }
371  tables.push_back(ntCurrent);
372  size_t rows = loadDataBlock(maxRows, ntCurrent.get());
373  nrows += rows;
374  if (rows < maxRows) { break; }
375  maxRows *= 2;
376  }
377 
378  super::resizeNumericTableImpl( nrows, nt );
379  nt->setNormalizationFlag(NumericTable::nonNormalized);
380 
381  BlockDescriptor<DAAL_DATA_TYPE> blockCurrent, block;
382 
383  size_t pos = 0;
384  int result = 0;
385 
386  for (size_t i = 0; i < tables.size(); i++) {
387  NumericTable *ntCurrent = (NumericTable*)(tables[i].get());
388  size_t rows = ntCurrent->getNumberOfRows();
389 
390  if (rows == 0) { continue; }
391 
392  ntCurrent->getBlockOfRows(0, rows, readOnly, blockCurrent);
393  nt->getBlockOfRows(pos, rows, writeOnly, block);
394 
395  result |= services::internal::daal_memcpy_s(block.getBlockPtr(), rows * ncols * sizeof(DAAL_DATA_TYPE),
396  blockCurrent.getBlockPtr(), rows * ncols * sizeof(DAAL_DATA_TYPE));
397 
398  ntCurrent->releaseBlockOfRows(blockCurrent);
399  nt->releaseBlockOfRows(block);
400 
401  super::combineStatistics( ntCurrent, nt, pos == 0);
402  pos += rows;
403  }
404  if (result)
405  {
406  this->_status.add(services::throwIfPossible(services::ErrorMemoryCopyFailedInternal));
407  }
408 
409  NumericTableDictionaryPtr ntDict = nt->getDictionarySharedPtr();
410  size_t nFeatures = _dict->getNumberOfFeatures();
411  ntDict->setNumberOfFeatures(nFeatures);
412  for (size_t i = 0; i < nFeatures; i++)
413  {
414  ntDict->setFeature((*_dict)[i].ntFeature, i);
415  }
416 
417  return nrows;
418  }
419 
420  services::Status createDictionaryFromContext() DAAL_C11_OVERRIDE
421  {
422  services::Status status = checkConnection();
423  DAAL_CHECK_STATUS_VAR(status);
424 
425  _connectionStatus = DataSource::notReady;
426 
427  if (_dict)
428  { return services::throwIfPossible(services::ErrorDictionaryAlreadyAvailable); }
429 
430  _dict = DataSourceDictionary::create(&status);
431  DAAL_CHECK_STATUS_VAR(status);
432 
433  status |= _featureManager.createDictionary(_hdlStmt, _dict.get());
434  DAAL_CHECK_STATUS_VAR(status);
435 
436  _connectionStatus = DataSource::readyForLoad;
437  return status;
438  }
439 
440  DataSourceIface::DataSourceStatus getStatus() DAAL_C11_OVERRIDE
441  {
442  return _connectionStatus;
443  }
444 
445  size_t getNumberOfAvailableRows() DAAL_C11_OVERRIDE
446  {
447  return 0;
448  }
449 
450  FeatureManager &getFeatureManager()
451  {
452  return _featureManager;
453  }
454 
455 private:
456  void initialize(size_t initialMaxRows)
457  {
458  _hdlDbc = SQL_NULL_HDBC;
459  _hdlEnv = SQL_NULL_HENV;
460  _hdlStmt = SQL_NULL_HSTMT;
461 
462  _idxLastRead = 0;
463  _initialMaxRows = initialMaxRows;
464  _connectionStatus = DataSource::notReady;
465  }
466 
467  services::Status connectUsingUserNameAndPassword(const std::string &dbname,
468  const std::string &username,
469  const std::string &password)
470  {
471  SQLRETURN ret = setupHandlesInternal();
472  if (!SQL_SUCCEEDED(ret)) { return services::throwIfPossible(services::ErrorHandlesSQL); }
473 
474  ret = connectInternal(dbname, username, password);
475  if (!SQL_SUCCEEDED(ret)) { return services::throwIfPossible(services::ErrorODBC); }
476 
477  return services::Status();
478  }
479 
480  services::Status connectUsingConnectionString(const std::string &connectionString)
481  {
482  SQLRETURN ret = setupHandlesInternal();
483  if (!SQL_SUCCEEDED(ret)) { return services::throwIfPossible(services::ErrorHandlesSQL); }
484 
485  ret = connectDriverInternal(connectionString);
486  if (!SQL_SUCCEEDED(ret)) { return services::throwIfPossible(services::ErrorODBC); }
487 
488  return services::Status();
489  }
490 
491  services::Status executeSelectAllQuery(const std::string &tableName)
492  {
493  if (!tableName.empty())
494  {
495  return executeQuery("SELECT * FROM " + tableName);
496  }
497  return services::Status();
498  }
499 
500  SQLRETURN connectInternal(const std::string &dbname,
501  const std::string &username,
502  const std::string &password)
503  {
504  return SQLConnect(_hdlDbc, (SQLCHAR *)dbname.c_str(), (SQLSMALLINT)dbname.size(),
505  (SQLCHAR *)username.c_str(), (SQLSMALLINT)username.size(),
506  (SQLCHAR *)password.c_str(), (SQLSMALLINT)password.size());
507  }
508 
509  SQLRETURN connectDriverInternal(const std::string &connectionString)
510  {
511  SQLSMALLINT outConnectionStringLength;
512  return SQLDriverConnect(_hdlDbc, SQL_NULL_HANDLE,
513  (SQLCHAR *)connectionString.c_str(),
514  (SQLSMALLINT)connectionString.size(),
515  (SQLCHAR *)NULL,
516  (SQLSMALLINT)0,
517  &outConnectionStringLength,
518  SQL_DRIVER_NOPROMPT);
519  }
520 
521  SQLRETURN setupHandlesInternal()
522  {
523  SQLRETURN ret = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &_hdlEnv);
524  if (!SQL_SUCCEEDED(ret)) { return ret; }
525 
526  ret = SQLSetEnvAttr(_hdlEnv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER);
527  if (!SQL_SUCCEEDED(ret)) { return ret; }
528 
529  ret = SQLAllocHandle(SQL_HANDLE_DBC, _hdlEnv, &_hdlDbc);
530  if (!SQL_SUCCEEDED(ret)) { return ret; }
531 
532  return SQL_SUCCESS;
533  }
534 
535  SQLRETURN freeHandlesInternal()
536  {
537  if (_hdlDbc == SQL_NULL_HDBC || _hdlEnv == SQL_NULL_HENV) { return SQL_SUCCESS; }
538 
539  SQLRETURN ret = SQLDisconnect(_hdlDbc);
540  if (!SQL_SUCCEEDED(ret)) { return ret; }
541 
542  ret = SQLFreeHandle(SQL_HANDLE_DBC, _hdlDbc);
543  if (!SQL_SUCCEEDED(ret)) { return ret; }
544 
545  ret = SQLFreeHandle(SQL_HANDLE_ENV, _hdlEnv);
546  if (!SQL_SUCCEEDED(ret)) { return ret; }
547 
548  _hdlDbc = SQL_NULL_HDBC;
549  _hdlEnv = SQL_NULL_HENV;
550 
551  return SQL_SUCCESS;
552  }
553 
554  services::Status checkConnection()
555  {
556  if (_connectionStatus == DataSource::notReady)
557  { return services::throwIfPossible(services::ErrorSourceDataNotAvailable); }
558 
559  return services::Status();
560  }
561 
562 private:
563  size_t _idxLastRead;
564  FeatureManager _featureManager;
565  DataSourceIface::DataSourceStatus _connectionStatus;
566 
567  SQLHENV _hdlEnv;
568  SQLHDBC _hdlDbc;
569  SQLHSTMT _hdlStmt;
570 };
573 } // namespace interface1
574 
575 using interface1::ODBCDataSource;
576 using interface1::ODBCDataSourceOptions;
577 
578 inline ODBCDataSourceOptions::Value operator |(const ODBCDataSourceOptions::Value &lhs,
579  const ODBCDataSourceOptions::Value &rhs)
580 { return ODBCDataSourceOptions::unite(lhs, rhs); }
581 
582 } // namespace data_management
583 } // namespace daal
584 
585 #endif
daal::services::ErrorODBC
Definition: error_indexes.h:390
daal::data_management::interface1::ODBCDataSource::getNumberOfAvailableRows
size_t getNumberOfAvailableRows() DAAL_C11_OVERRIDE
Definition: odbc_data_source.h:445
daal::data_management::interface1::DataSourceIface::NumericTableAllocationFlag
NumericTableAllocationFlag
Specifies whether a Numeric Table is allocated inside of the Data Source object.
Definition: data_source.h:80
daal::data_management::interface1::NumericTableIface::sumSquares
Definition: numeric_table.h:301
daal::data_management::interface1::NumericTableIface::maximum
Definition: numeric_table.h:299
daal::data_management::interface1::DataSource::checkNumericTable
services::Status checkNumericTable()
Definition: data_source.h:346
daal::services::ErrorDictionaryAlreadyAvailable
Definition: error_indexes.h:156
daal::data_management::interface1::NumericTable::getDataMemoryStatus
virtual MemoryStatus getDataMemoryStatus() const
Definition: numeric_table.h:722
daal::data_management::interface1::DataSource::status
services::Status status() const
Definition: data_source.h:310
daal::data_management::interface1::ODBCDataSource::freeHandles
services::Status freeHandles()
Definition: odbc_data_source.h:247
daal::data_management::interface1::NumericTableIface::doAllocate
Definition: numeric_table.h:289
daal::services::ErrorIncorrectNumberOfObservations
Definition: error_indexes.h:73
daal::data_management::interface1::DataSourceIface::doDictionaryFromContext
Definition: data_source.h:73
daal::data_management::interface1::ODBCDataSource::ODBCDataSource
ODBCDataSource(const std::string &dbname, const std::string &tableName, const std::string &userName, const std::string &password, const ODBCDataSourceOptions &options, size_t initialMaxRows=10)
Definition: odbc_data_source.h:164
daal::data_management::interface1::DataSourceIface::notAllocateNumericTable
Definition: data_source.h:82
daal::data_management::interface1::NumericTable
Class for a data management component responsible for representation of data in the numeric format...
Definition: numeric_table.h:577
daal::services::ErrorSQLstmtHandle
Definition: error_indexes.h:391
daal::data_management::interface1::ODBCDataSource::ODBCDataSource
ODBCDataSource(const std::string &dbname, const std::string &tableName="", const std::string &userName="", const std::string &password="", DataSourceIface::NumericTableAllocationFlag doAllocateNumericTable=DataSource::notAllocateNumericTable, DataSourceIface::DictionaryCreationFlag doCreateDictionaryFromContext=DataSource::notDictionaryFromContext, size_t initialMaxRows=10)
Definition: odbc_data_source.h:132
daal::data_management::interface1::ODBCDataSource::loadDataBlock
size_t loadDataBlock() DAAL_C11_OVERRIDE
Definition: odbc_data_source.h:329
daal::data_management::interface1::DataSourceIface::notDictionaryFromContext
Definition: data_source.h:72
daal::data_management::interface1::DataCollection::size
size_t size() const
daal::data_management::interface1::DataSourceIface::readyForLoad
Definition: data_source.h:60
daal::data_management::interface1::ODBCDataSource::ODBCDataSource
ODBCDataSource(const std::string &connectionString, const ODBCDataSourceOptions &options, size_t initialMaxRows=10)
Definition: odbc_data_source.h:192
daal::data_management::interface1::HomogenNumericTable::create
static services::SharedPtr< HomogenNumericTable< DataType > > create(NumericTableDictionaryPtr ddictForHomogenNumericTable, services::Status *stat=NULL)
Definition: homogen_numeric_table.h:95
daal::data_management::interface1::NumericTableIface::minimum
Definition: numeric_table.h:298
daal::data_management::interface1::DataSourceIface::notReady
Definition: data_source.h:63
daal::services::ErrorSourceDataNotAvailable
Definition: error_indexes.h:167
daal::data_management::interface1::NumericTableIface::userAllocated
Definition: numeric_table.h:277
daal::services::ErrorHandlesSQL
Definition: error_indexes.h:389
daal::services::ErrorNullByteInjection
Definition: error_indexes.h:394
daal::data_management::interface1::DataSourceIface::DataSourceStatus
DataSourceStatus
Specifies the status of the Data Source.
Definition: data_source.h:58
daal::data_management::interface1::NumericTable::getNumberOfColumns
size_t getNumberOfColumns() const
Definition: numeric_table.h:654
daal::data_management::internal::DataSourceOptionsImpl
Class that helps to define data source options.
Definition: data_source_options.h:33
daal::data_management::interface1::DataSourceIface::doAllocateNumericTable
Definition: data_source.h:83
daal::data_management::interface1::NumericTable::getNumberOfRows
size_t getNumberOfRows() const
Definition: numeric_table.h:663
daal::data_management::interface1::ODBCDataSource
Connects to data sources with the ODBC API.
Definition: odbc_data_source.h:104
daal::services::daal_memcpy_s
DAAL_DEPRECATED DAAL_EXPORT void daal_memcpy_s(void *dest, size_t numberOfElements, const void *src, size_t count)
daal::data_management::interface1::ODBCDataSource::createDictionaryFromContext
services::Status createDictionaryFromContext() DAAL_C11_OVERRIDE
Definition: odbc_data_source.h:420
daal::data_management::interface1::NumericTableIface::nonNormalized
Definition: numeric_table.h:319
daal::services::ErrorNullInputNumericTable
Definition: error_indexes.h:83
daal::data_management::interface1::DataSourceIface::DictionaryCreationFlag
DictionaryCreationFlag
Specifies whether a Data Dictionary is created from the context of a Data Source. ...
Definition: data_source.h:70
daal::services::ErrorNumericTableNotAllocated
Definition: error_indexes.h:160
daal::data_management::interface1::ODBCDataSource::loadDataBlock
virtual size_t loadDataBlock(size_t maxRows) DAAL_C11_OVERRIDE
Definition: odbc_data_source.h:256
daal::data_management::interface1::Dictionary::create
static services::SharedPtr< Dictionary > create(size_t nfeat, FeaturesEqual featuresEqual=notEqual, services::Status *stat=NULL)
Definition: data_dictionary.h:188
daal::data_management::interface1::DenseNumericTableIface::getBlockOfRows
virtual services::Status getBlockOfRows(size_t vector_idx, size_t vector_num, ReadWriteMode rwflag, BlockDescriptor< double > &block)=0
daal::data_management::interface1::BlockDescriptor< DAAL_DATA_TYPE >
daal::data_management::interface1::DenseNumericTableIface::releaseBlockOfRows
virtual services::Status releaseBlockOfRows(BlockDescriptor< double > &block)=0
daal::data_management::interface1::NumericTable::getDictionarySharedPtr
virtual NumericTableDictionaryPtr getDictionarySharedPtr() const DAAL_C11_OVERRIDE
Definition: numeric_table.h:635
daal::services::ErrorIncorrectNumberOfFeatures
Definition: error_indexes.h:72
daal::data_management::interface1::ODBCDataSource::getStatus
DataSourceIface::DataSourceStatus getStatus() DAAL_C11_OVERRIDE
Definition: odbc_data_source.h:440
daal::services::ErrorMemoryCopyFailedInternal
Definition: error_indexes.h:152
daal::data_management::interface1::NumericTableIface::sum
Definition: numeric_table.h:300
daal::data_management::interface1::ODBCDataSource::loadDataBlock
size_t loadDataBlock(NumericTable *nt) DAAL_C11_OVERRIDE
Definition: odbc_data_source.h:345
daal::data_management::interface1::DataCollection::push_back
DataCollection & push_back(const SerializationIfacePtr &x)
daal::data_management::interface1::ODBCDataSource::loadDataBlock
virtual size_t loadDataBlock(size_t maxRows, NumericTable *nt)
Definition: odbc_data_source.h:276
daal::data_management::interface1::DataSourceTemplate
Implements the abstract DataSourceIface interface.
Definition: data_source.h:464
daal::data_management::interface1::DataSource::checkDictionary
services::Status checkDictionary()
Definition: data_source.h:360
daal::data_management::interface1::ODBCDataSourceOptions
Options of ODBC data source.
Definition: odbc_data_source.h:60
daal::data_management::interface1::DataCollection
Class that provides functionality of Collection container for objects derived from SerializationIface...
Definition: data_collection.h:47
daal::data_management::interface1::BlockDescriptor::getBlockPtr
DataType * getBlockPtr() const
Definition: numeric_table.h:71

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