mrboojum opened a new issue, #42138:
URL: https://github.com/apache/arrow/issues/42138
### Describe the usage question you have. Please include as many useful
details as possible.
TLDR: How can I trigger static initialization of the arrow C++ library?
Context:
Using apache arrow in a c++ application running on large multi NUMA
machines. The application does have its own heap framework (delegating actual
allocation to je_malloc/OS heaps) to prevent/minimize cross NUMA access. We
would like to be able to trigger all allocations needed for static variables on
a specific heap.
Example:
Is there a general way to trigger all allocations needed for static
variables like the ones below?
```
#define TYPE_FACTORY(NAME, KLASS) \
const std::shared_ptr<DataType>& NAME() { \?
static std::shared_ptr<DataType> result = std::make_shared<KLASS>(); \
return result; \
}
TYPE_FACTORY(null, NullType)
TYPE_FACTORY(boolean, BooleanType)
TYPE_FACTORY(int8, Int8Type)
TYPE_FACTORY(uint8, UInt8Type)
TYPE_FACTORY(int16, Int16Type)
TYPE_FACTORY(uint16, UInt16Type)
TYPE_FACTORY(int32, Int32Type)
TYPE_FACTORY(uint32, UInt32Type)
TYPE_FACTORY(int64, Int64Type)
TYPE_FACTORY(uint64, UInt64Type)
TYPE_FACTORY(float16, HalfFloatType)
TYPE_FACTORY(float32, FloatType)
TYPE_FACTORY(float64, DoubleType)
TYPE_FACTORY(utf8, StringType)
TYPE_FACTORY(large_utf8, LargeStringType)
TYPE_FACTORY(binary, BinaryType)
TYPE_FACTORY(large_binary, LargeBinaryType)
TYPE_FACTORY(date64, Date64Type)
TYPE_FACTORY(date32, Date32Type)
```
### Component(s)
C++
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]