|
Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|
Tissue Forge GPU acceleration on CUDA-supporting devices. More...
Classes | |
| struct | Angle |
| struct | AngleConfig |
| CUDA runtime control interface for Tissue Forge angles. More... | |
| struct | Bond |
| struct | BondConfig |
| CUDA runtime control interface for Tissue Forge bonds. More... | |
| struct | BoundaryCondition |
| struct | BoundaryConditions |
| struct | CUDAContext |
| A convenience wrap of the CUDA context for JIT-compiled Tissue Forge programs. More... | |
| struct | CUDADevice |
| A simple interface with a CUDA device. More... | |
| struct | CUDAFunction |
| A CUDA kernel from a JIT-compiled Tissue Forge program. More... | |
| struct | CUDARTProgram |
| A JIT-compiled CUDA Tissue Forge program. More... | |
| struct | CUDARTSource |
| Convenience class for loading source from file and storing, here intended for CUDA. More... | |
| struct | DPDPotentialData |
| struct | EngineConfig |
| CUDA runtime control interface for Tissue Forge engine. More... | |
| struct | Flux |
| struct | Fluxes |
| struct | FluxTypeIdPair |
| struct | Particle |
| struct | Potential |
| struct | PotentialData |
| struct | queue_cuda |
| struct | SimulatorConfig |
| CUDA runtime control interface for Simulator. More... | |
| struct | task_cuda |
Functions | |
| int | Angle_setThreads (const unsigned int &nr_threads) |
| int | Angle_setBlocks (const unsigned int &nr_blocks) |
| int | Angle_getDevice () |
| int | Angle_toDevice (engine *e) |
| int | Angle_fromDevice (engine *e) |
| int | Angle_refresh (engine *e) |
| int | Angle_refreshAngle (engine *e, AngleHandle *a) |
| int | Angle_refreshAngles (engine *e, AngleHandle **angles, int nr_angles) |
| int | engine_cuda_add_angle (AngleHandle *ah) |
| int | engine_cuda_finalize_angle (int aind) |
| int | engine_cuda_finalize_angles (engine *e, int *ainds, int nr_angles) |
| int | engine_cuda_finalize_angles_all (engine *e) |
| int | engine_angle_eval_cuda (struct TissueForge::Angle *angles, int N, struct engine *e, float *epot_out) |
| int | Bond_setThreads (const unsigned int &nr_threads) |
| int | Bond_setBlocks (const unsigned int &nr_blocks) |
| int | Bond_getDevice () |
| int | Bond_setDevice (engine *e, const int &deviceId) |
| int | Bond_toDevice (engine *e) |
| int | Bond_fromDevice (engine *e) |
| int | Bond_refresh (engine *e) |
| int | Bond_refreshBond (engine *e, BondHandle *b) |
| int | Bond_refreshBonds (engine *e, BondHandle **bonds, int nr_bonds) |
| int | engine_cuda_add_bond (TissueForge::Bond *b) |
| int | engine_cuda_add_bonds (TissueForge::Bond *bonds, int nr_bonds) |
| int | engine_cuda_finalize_bond (int bind) |
| int | engine_cuda_finalize_bonds (engine *e, int *binds, int nr_bonds) |
| int | engine_cuda_finalize_bonds_all (engine *e) |
| int | engine_bond_eval_cuda (struct TissueForge::Bond *bonds, int N, struct engine *e, float *epot_out) |
| __device__ void | Flux_getFluxes (int **fxind_cuda, Fluxes **fluxes_cuda) |
| __device__ void | Flux_getNrFluxes (unsigned int *nr_fluxes) |
| __device__ void | Flux_getNrStates (unsigned int *nr_states) |
| TissueForge::Potential | toCUDADevice (const TissueForge::Potential &p) |
| Loads a potential onto a CUDA device. | |
| __host__ __device__ void | cudaFree (TissueForge::Potential *p) |
| __device__ void | potential_eval_r_cuda (struct TissueForge::Potential *p, FPTYPE r, FPTYPE *e, FPTYPE *f) |
| Evaluates the given potential at the given point (interpolated). | |
| __device__ void | potential_eval_cuda (struct TissueForge::Potential *p, float r2, float *e, float *f) |
| Evaluates the given potential at the given point (interpolated). | |
| CUresult | cuda_errorchk (CUresult retCode, const char *file, int line) |
| nvrtcResult | nvrtc_errorchk (nvrtcResult retCode, const char *file, int line) |
| cudaError_t | cudart_errorchk (cudaError_t retCode, const char *file, int line) |
| void | init () |
| Initialize CUDA. | |
| void | setGLDevice (const int &deviceId) |
| std::string | getDeviceName (const int &deviceId) |
| Get the name of a device. | |
| size_t | getDeviceTotalMem (const int &deviceId) |
| Get the total memory of device. | |
| int | getDeviceAttribute (const int &deviceId, const int &attrib) |
| Get the attribute value of a device. | |
| int | getNumDevices () |
| Get number of available compute-capable devices. | |
| std::string | getDevicePCIBusId (const int &deviceId) |
| Get the PCI bus id of a device. | |
| int | getCurrentDevice () |
| Get the device id of the current context of the calling CPU thread. | |
| int | maxThreadsPerBlock (const int &deviceId) |
| Maximum number of threads per block. | |
| int | maxBlockDimX (const int &deviceId) |
| Maximum x-dimension of a block. | |
| int | maxBlockDimY (const int &deviceId) |
| Maximum y-dimension of a block. | |
| int | maxBlockDimZ (const int &deviceId) |
| Maximum z-dimension of a block. | |
| int | maxGridDimX (const int &deviceId) |
| Maximum x-dimension of a grid. | |
| int | maxGridDimY (const int &deviceId) |
| Maximum y-dimension of a grid. | |
| int | maxGridDimZ (const int &deviceId) |
| Maximum z-dimension of a grid. | |
| int | maxSharedMemPerBlock (const int &deviceId) |
| Maximum amount of shared memory available to a thread block in bytes. | |
| int | maxTotalMemConst (const int &deviceId) |
| Memory available on device for constant variables in a CUDA C kernel in bytes. | |
| int | warpSize (const int &deviceId) |
| Warp size in threads. | |
| int | maxRegsPerBlock (const int &deviceId) |
| Maximum number of 32-bit registers available to a thread block. | |
| int | clockRate (const int &deviceId) |
| The typical clock frequency in kilohertz. | |
| bool | gpuOverlap (const int &deviceId) |
| Test if the device can concurrently copy memory between host and device while executing a kernel. | |
| int | numMultiprocessors (const int &deviceId) |
| Number of multiprocessors on the device. | |
| bool | kernelExecTimeout (const int &deviceId) |
| Test if there is a run time limit for kernels executed on the device. | |
| bool | computeModeDefault (const int &deviceId) |
| Test if device is not restricted and can have multiple CUDA contexts present at a single time. | |
| bool | computeModeProhibited (const int &deviceId) |
| Test if device is prohibited from creating new CUDA contexts. | |
| bool | computeModeExclusive (const int &deviceId) |
| Test if device can have only one context used by a single process at a time. | |
| int | PCIDeviceId (const int &deviceId) |
| PCI device (also known as slot) identifier of the device. | |
| int | PCIDomainId (const int &deviceId) |
| PCI domain identifier of the device. | |
| int | clockRateMem (const int &deviceId) |
| Peak memory clock frequency in kilohertz. | |
| int | globalMemBusWidth (const int &deviceId) |
| Global memory bus width in bits. | |
| int | L2CacheSize (const int &deviceId) |
| Size of L2 cache in bytes. 0 if the device doesn't have L2 cache. | |
| int | maxThreadsPerMultiprocessor (const int &deviceId) |
| Maximum resident threads per multiprocessor. | |
| int | computeCapabilityMajor (const int &deviceId) |
| Major compute capability version number. | |
| int | computeCapabilityMinor (const int &deviceId) |
| Minor compute capability version number. | |
| bool | L1CacheSupportGlobal (const int &deviceId) |
| Test if device supports caching globals in L1 cache. | |
| bool | L1CacheSupportLocal (const int &deviceId) |
| Test if device supports caching locals in L1 cache. | |
| int | maxSharedMemPerMultiprocessor (const int &deviceId) |
| Maximum amount of shared memory available to a multiprocessor in bytes. | |
| int | maxRegsPerMultiprocessor (const int &deviceId) |
| Maximum number of 32-bit registers available to a multiprocessor. | |
| bool | managedMem (const int &deviceId) |
| Test if device supports allocating managed memory on this system. | |
| bool | multiGPUBoard (const int &deviceId) |
| Test if device is on a multi-GPU board. | |
| int | multiGPUBoardGroupId (const int &deviceId) |
| Unique identifier for a group of devices associated with the same board. | |
| void | test (const int &numBlocks, const int &numThreads, const int &numEls, const int &deviceId=0) |
| Tests JIT-compiled program execution and deployment. | |
| std::string | tfIncludePath () |
| Returns the current path to the installed Tissue Forge include directory. | |
| HRESULT | setTfIncludePath (const std::string &_path) |
| Set the current path to the installed Tissue Forge include directory. | |
| std::string | tfPrivateIncludePath () |
| Returns the path to the installed Tissue Forge private include directory. | |
| std::string | tfResourcePath () |
| Returns the current path to the installed Tissue Forge resource directory. | |
| HRESULT | setTfResourcePath (const std::string &_path) |
| Set the current path to the installed Tissue Forge resource directory. | |
| std::string | CUDAPath () |
| Returns the path to the installed Tissue Forge CUDA resources directory. | |
| std::string | CUDAIncludePath () |
| Returns the current path to the installed CUDA include directory. | |
| HRESULT | setCUDAIncludePath (const std::string &_path) |
| Set the current path to the installed CUDA include directory. | |
| std::string | CUDAResourcePath (const std::string &relativePath) |
| Returns an absolute path to a subdirectory of the install Tissue Forge CUDA resources directory. | |
| std::string | CUDAPTXObjectRelPath () |
| Returns the relative path to the installed Tissue Forge CUDA PTX object directory. | |
| std::vector< std::string > | CUDAArchs () |
| Returns the supported CUDA architectures of the installation. | |
Tissue Forge GPU acceleration on CUDA-supporting devices.
| int TissueForge::cuda::clockRate | ( | const int & | deviceId | ) |
The typical clock frequency in kilohertz.
| int TissueForge::cuda::clockRateMem | ( | const int & | deviceId | ) |
Peak memory clock frequency in kilohertz.
| int TissueForge::cuda::computeCapabilityMajor | ( | const int & | deviceId | ) |
Major compute capability version number.
| int TissueForge::cuda::computeCapabilityMinor | ( | const int & | deviceId | ) |
Minor compute capability version number.
| bool TissueForge::cuda::computeModeDefault | ( | const int & | deviceId | ) |
Test if device is not restricted and can have multiple CUDA contexts present at a single time.
| bool TissueForge::cuda::computeModeExclusive | ( | const int & | deviceId | ) |
Test if device can have only one context used by a single process at a time.
| bool TissueForge::cuda::computeModeProhibited | ( | const int & | deviceId | ) |
Test if device is prohibited from creating new CUDA contexts.
| std::vector< std::string > TissueForge::cuda::CUDAArchs | ( | ) |
Returns the supported CUDA architectures of the installation.
| std::string TissueForge::cuda::CUDAIncludePath | ( | ) |
Returns the current path to the installed CUDA include directory.
| std::string TissueForge::cuda::CUDAPath | ( | ) |
Returns the path to the installed Tissue Forge CUDA resources directory.
| std::string TissueForge::cuda::CUDAPTXObjectRelPath | ( | ) |
Returns the relative path to the installed Tissue Forge CUDA PTX object directory.
The path is relative to the Tissue Forge CUDA resources directory, and depends on the build type of the installation.
| std::string TissueForge::cuda::CUDAResourcePath | ( | const std::string & | relativePath | ) |
Returns an absolute path to a subdirectory of the install Tissue Forge CUDA resources directory.
| relativePath |
| int TissueForge::cuda::getCurrentDevice | ( | ) |
Get the device id of the current context of the calling CPU thread.
| int TissueForge::cuda::getDeviceAttribute | ( | const int & | deviceId, |
| const int & | attrib ) |
Get the attribute value of a device.
| deviceId | |
| attrib |
| std::string TissueForge::cuda::getDeviceName | ( | const int & | deviceId | ) |
Get the name of a device.
| deviceId |
| std::string TissueForge::cuda::getDevicePCIBusId | ( | const int & | deviceId | ) |
Get the PCI bus id of a device.
| deviceId |
| size_t TissueForge::cuda::getDeviceTotalMem | ( | const int & | deviceId | ) |
Get the total memory of device.
| deviceId |
| int TissueForge::cuda::getNumDevices | ( | ) |
Get number of available compute-capable devices.
| int TissueForge::cuda::globalMemBusWidth | ( | const int & | deviceId | ) |
Global memory bus width in bits.
| bool TissueForge::cuda::gpuOverlap | ( | const int & | deviceId | ) |
Test if the device can concurrently copy memory between host and device while executing a kernel.
| bool TissueForge::cuda::kernelExecTimeout | ( | const int & | deviceId | ) |
Test if there is a run time limit for kernels executed on the device.
| bool TissueForge::cuda::L1CacheSupportGlobal | ( | const int & | deviceId | ) |
Test if device supports caching globals in L1 cache.
| bool TissueForge::cuda::L1CacheSupportLocal | ( | const int & | deviceId | ) |
Test if device supports caching locals in L1 cache.
| int TissueForge::cuda::L2CacheSize | ( | const int & | deviceId | ) |
Size of L2 cache in bytes. 0 if the device doesn't have L2 cache.
| bool TissueForge::cuda::managedMem | ( | const int & | deviceId | ) |
Test if device supports allocating managed memory on this system.
| int TissueForge::cuda::maxBlockDimX | ( | const int & | deviceId | ) |
Maximum x-dimension of a block.
| int TissueForge::cuda::maxBlockDimY | ( | const int & | deviceId | ) |
Maximum y-dimension of a block.
| int TissueForge::cuda::maxBlockDimZ | ( | const int & | deviceId | ) |
Maximum z-dimension of a block.
| int TissueForge::cuda::maxGridDimX | ( | const int & | deviceId | ) |
Maximum x-dimension of a grid.
| int TissueForge::cuda::maxGridDimY | ( | const int & | deviceId | ) |
Maximum y-dimension of a grid.
| int TissueForge::cuda::maxGridDimZ | ( | const int & | deviceId | ) |
Maximum z-dimension of a grid.
| int TissueForge::cuda::maxRegsPerBlock | ( | const int & | deviceId | ) |
Maximum number of 32-bit registers available to a thread block.
| int TissueForge::cuda::maxRegsPerMultiprocessor | ( | const int & | deviceId | ) |
Maximum number of 32-bit registers available to a multiprocessor.
| int TissueForge::cuda::maxSharedMemPerBlock | ( | const int & | deviceId | ) |
Maximum amount of shared memory available to a thread block in bytes.
| int TissueForge::cuda::maxSharedMemPerMultiprocessor | ( | const int & | deviceId | ) |
Maximum amount of shared memory available to a multiprocessor in bytes.
| int TissueForge::cuda::maxThreadsPerBlock | ( | const int & | deviceId | ) |
Maximum number of threads per block.
| int TissueForge::cuda::maxThreadsPerMultiprocessor | ( | const int & | deviceId | ) |
Maximum resident threads per multiprocessor.
| int TissueForge::cuda::maxTotalMemConst | ( | const int & | deviceId | ) |
Memory available on device for constant variables in a CUDA C kernel in bytes.
| bool TissueForge::cuda::multiGPUBoard | ( | const int & | deviceId | ) |
Test if device is on a multi-GPU board.
| int TissueForge::cuda::multiGPUBoardGroupId | ( | const int & | deviceId | ) |
Unique identifier for a group of devices associated with the same board.
| int TissueForge::cuda::numMultiprocessors | ( | const int & | deviceId | ) |
Number of multiprocessors on the device.
| int TissueForge::cuda::PCIDeviceId | ( | const int & | deviceId | ) |
PCI device (also known as slot) identifier of the device.
| int TissueForge::cuda::PCIDomainId | ( | const int & | deviceId | ) |
PCI domain identifier of the device.
| __device__ void TissueForge::cuda::potential_eval_cuda | ( | struct TissueForge::Potential * | p, |
| float | r2, | ||
| float * | e, | ||
| float * | f ) |
Evaluates the given potential at the given point (interpolated).
| p | The #potential to be evaluated. |
| r2 | The radius at which it is to be evaluated, squared. |
| e | Pointer to a floating-point value in which to store the interaction energy. |
| f | Pointer to a floating-point value in which to store the magnitude of the interaction force divided by r. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
| __device__ void TissueForge::cuda::potential_eval_r_cuda | ( | struct TissueForge::Potential * | p, |
| FPTYPE | r, | ||
| FPTYPE * | e, | ||
| FPTYPE * | f ) |
Evaluates the given potential at the given point (interpolated).
| p | The #potential to be evaluated. |
| r | The radius at which it is to be evaluated. |
| e | Pointer to a floating-point value in which to store the interaction energy. |
| f | Pointer to a floating-point value in which to store the magnitude of the interaction force. |
Note that for efficiency reasons, this function does not check if any of the parameters are NULL or if sqrt(r2) is within the interval of the #potential p.
| HRESULT TissueForge::cuda::setCUDAIncludePath | ( | const std::string & | _path | ) |
Set the current path to the installed CUDA include directory.
| _path | absolute path |
| HRESULT TissueForge::cuda::setTfIncludePath | ( | const std::string & | _path | ) |
Set the current path to the installed Tissue Forge include directory.
| _path | absolute path |
| HRESULT TissueForge::cuda::setTfResourcePath | ( | const std::string & | _path | ) |
Set the current path to the installed Tissue Forge resource directory.
| _path | absolute path |
| void TissueForge::cuda::test | ( | const int & | numBlocks, |
| const int & | numThreads, | ||
| const int & | numEls, | ||
| const int & | deviceId = 0 ) |
Tests JIT-compiled program execution and deployment.
Enable logger at debug level to see step-by-step report.
| numBlocks | number of blocks |
| numThreads | number of threads |
| numEls | number of elements in calculations |
| deviceId | ID of CUDA device |
| std::string TissueForge::cuda::tfIncludePath | ( | ) |
Returns the current path to the installed Tissue Forge include directory.
| std::string TissueForge::cuda::tfPrivateIncludePath | ( | ) |
Returns the path to the installed Tissue Forge private include directory.
| std::string TissueForge::cuda::tfResourcePath | ( | ) |
Returns the current path to the installed Tissue Forge resource directory.
| TissueForge::Potential TissueForge::cuda::toCUDADevice | ( | const TissueForge::Potential & | p | ) |
Loads a potential onto a CUDA device.
| p | The potential |
| int TissueForge::cuda::warpSize | ( | const int & | deviceId | ) |
Warp size in threads.