13#include "arcane/aleph/AlephArcane.h"
14#include "arcane/aleph/cuda/IAlephCuda.h"
25class CudaAlephFactoryImpl
37 virtual void initialize()
39 debug() <<
"\t[AlephFactory::AlephFactory] cudaDeviceReset";
41 debug() <<
"\t[AlephFactory::AlephFactory] cudaDeviceSynchronize";
42 cudaDeviceSynchronize();
44 if (cublasInit() != CUBLAS_STATUS_SUCCESS)
49 cudaGetDeviceCount(&deviceCount);
53 for (dev = 0; dev < deviceCount; ++dev) {
54 cudaDeviceProp deviceProp;
55 cudaGetDeviceProperties(&deviceProp, dev);
56 if (strncmp(deviceProp.name,
"Device Emulation", 16))
59 if (dev == deviceCount)
61 debug() <<
"\t[Aleph::Cuda::device_check] setting device!";
#define ARCANE_REGISTER_APPLICATION_FACTORY(aclass, ainterface, aname)
Registers a factory service for the class aclass.
AbstractService(const ServiceBuildInfo &)
Constructor from a ServiceBuildInfo.
Exception when a fatal error has occurred.
Interface of an implementation factory for Aleph.
Structure containing the information to create a service.
TraceMessageDbg debug(Trace::eDebugLevel=Trace::Medium) const
Flow for a debug message.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.