Gromacs  2026.0-dev-20250623-2b0916a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
typecasts_cuda_hip.h File Reference
#include "gmxpre.h"
#include "gromacs/math/vectypes.h"
+ Include dependency graph for typecasts_cuda_hip.h:
+ This graph shows which files directly or indirectly include this file:

Description

Declare functions to be used to cast CPU types to compatible GPU types.

Author
Artem Zhmurov zhmur.nosp@m.ov@g.nosp@m.mail..nosp@m.com

Functions

static __forceinline__
__host__ __device__ float3 * 
asFloat3 (gmx::RVec *in)
 Cast RVec buffer to float3 buffer. More...
 
static __forceinline__
__host__ __device__ const
float3 * 
asFloat3 (const gmx::RVec *in)
 Cast RVec buffer to float3 buffer. More...
 
static __forceinline__
__host__ __device__ float3 ** 
asFloat3Pointer (gmx::RVec **in)
 Cast pointer RVec buffer to a pointer to float3 buffer. More...
 
static __host__ __device__
const float3 *const * 
asFloat3Pointer (const gmx::RVec *const *in)
 Cast pointer RVec buffer to a pointer to float3 buffer. More...
 

Function Documentation

static __forceinline__ __host__ __device__ float3* asFloat3 ( gmx::RVec in)
static

Cast RVec buffer to float3 buffer.

Parameters
[in]inThe RVec buffer to cast.
Returns
Buffer, casted to float3*.
static __forceinline__ __host__ __device__ const float3* asFloat3 ( const gmx::RVec in)
static

Cast RVec buffer to float3 buffer.

Parameters
[in]inThe RVec buffer to cast.
Returns
Buffer, casted to float3*.
static __forceinline__ __host__ __device__ float3** asFloat3Pointer ( gmx::RVec **  in)
static

Cast pointer RVec buffer to a pointer to float3 buffer.

Parameters
[in]inThe Pointer to RVec buffer to cast.
Returns
Buffer pointer, casted to float3*.
static __host__ __device__ const float3* const* asFloat3Pointer ( const gmx::RVec *const *  in)
inlinestatic

Cast pointer RVec buffer to a pointer to float3 buffer.

Parameters
[in]inThe Pointer to RVec buffer to cast.
Returns
Buffer pointer, casted to float3*.