14#include "arcane/impl/DataFactoryMng.h"
16#include "arcane/utils/PlatformUtils.h"
17#include "arcane/utils/Deleter.h"
18#include "arcane/utils/ITraceMng.h"
19#include "arcane/utils/FatalErrorException.h"
21#include "arcane/core/IApplication.h"
22#include "arcane/core/IData.h"
23#include "arcane/core/IDataStorageFactory.h"
26#include "arcane/datatype/DataStorageTypeInfo.h"
27#include "arcane/datatype/DataStorageBuildInfo.h"
29#include "arcane/impl/SerializedData.h"
30#include "arcane/impl/DataFactory.h"
31#include "arcane/impl/DataOperation.h"
68Ref<IData> DataFactoryMng::
69createSimpleDataRef(
const String& storage_type,
const DataStorageBuildInfo& build_info)
71 auto x = m_factories.find(storage_type);
72 if (x == m_factories.end())
73 ARCANE_FATAL(
"Can not find data factory named={0}", storage_type);
76 DataStorageBuildInfo b = build_info;
77 if (!b.memoryAllocator())
78 b.setMemoryAllocator(platform::getDefaultDataAllocator());
80 return x->second->createSimpleDataRef(b);
89 return arcaneCreateDataOperation(rt);
101 nb_base_element, is_multi_size, dimensions);
108createEmptySerializedDataRef()
119 arcaneRegisterSimpleData(
this);
138 m_factories.insert(std::make_pair(t.fullName(), factory));
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Various mathematical functions.
Interface of a data factory.
Type information for a data container.
Interface of the data factory manager.
Interface of an operation on a data.
Reference to an instance.
ITraceMng * traceMng() const
Trace manager.
eReduceType
Supported reduction types.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Ref< ISerializedData > arcaneCreateSerializedDataRef(eDataType data_type, Int64 memory_size, Integer nb_dim, Int64 nb_element, Int64 nb_base_element, bool is_multi_size, Int64ConstArrayView dimensions)
Creates serialized data.
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
Ref< ISerializedData > arcaneCreateEmptySerializedDataRef()
Creates serialized data.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.