MCPcopy Create free account
hub / github.com/SeisSol/SeisSol / hostToDevicePointer

Function hostToDevicePointer

src/Initializer/MemoryAllocator.cpp:205–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void* hostToDevicePointer(void* host, enum Memkind memkind) {
206 if (host == nullptr) {
207 return nullptr;
208 }
209 if (memkind == Memkind::PinnedMemory) {
210#ifdef ACL_DEVICE
211 return device::DeviceInstance::getInstance().api->devicePointer(host);
212#else
213 return host;
214#endif
215 } else {
216 return host;
217 }
218}
219
220void printMemoryAlignment(std::vector<std::vector<unsigned long long>> memoryAlignment) {
221 logDebug() << "printing memory alignment per struct";

Callers 2

hostToDevicePointerTypedFunction · 0.85
allocateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected