ElfPSP_AntColony
Protein Structure Prediction using Ant Colony Optimization
Functions
Cuda_device_utilities_cuh

Functions

__device__ void print (int3 a)
 Prints an int3 from within device code. More...
 
__device__ int3 operator- (int3 a, int3 b)
 Subtracts two int3. More...
 
__device__ int3 operator+ (int3 a, int3 b)
 Adds two int3. More...
 
__device__ int norm1 (int3 a)
 Returns the norm 1 of an int3 (norm of the absolute value). More...
 
__device__ void moveSeed (int &movingSeed)
 Randomizes the given number, which also serves as the random generation seed. More...
 
__device__ int randomize (int &movingSeed)
 A wrapper for moveSeed, which also returns the generated random number. More...
 
__device__ double randomize_d (int &movingSeed)
 Version of randomize that returns a number in range [0,1]. More...
 
__device__ double atomicAdd_d (double *address, double val)
 Atomic addition, which only uses the built-in atomicCAS function. More...
 

Detailed Description

Function Documentation

◆ atomicAdd_d()

__device__ double atomicAdd_d ( double *  address,
double  val 
)
inline

Atomic addition, which only uses the built-in atomicCAS function.

This function aims at older versions of GPUs, which don't have atomicAdd().

◆ moveSeed()

__device__ void moveSeed ( int &  movingSeed)
inline

Randomizes the given number, which also serves as the random generation seed.

◆ norm1()

__device__ int norm1 ( int3  a)
inline

Returns the norm 1 of an int3 (norm of the absolute value).

◆ operator+()

__device__ int3 operator+ ( int3  a,
int3  b 
)
inline

Adds two int3.

◆ operator-()

__device__ int3 operator- ( int3  a,
int3  b 
)
inline

Subtracts two int3.

◆ print()

__device__ void print ( int3  a)
inline

Prints an int3 from within device code.

◆ randomize()

__device__ int randomize ( int &  movingSeed)
inline

A wrapper for moveSeed, which also returns the generated random number.

◆ randomize_d()

__device__ double randomize_d ( int &  movingSeed)
inline

Version of randomize that returns a number in range [0,1].