LibCudaOptimize  1.0
utilities.h File Reference
#include "OptimizerLog.h"
#include <stdlib.h>
#include <cuda_runtime.h>
Include dependency graph for utilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define IMUL(a, b)   __mul24(a, b)
 Fast mul on G8x / G9x / G100.

Functions

void optimizerCudaCheckError (const char *errorMessage, const char *file, int line, const std::string logger="")
 Print CUDA errors.
int iDivUp (int a, int b)
 ceil(a / b)
int iDivDown (int a, int b)
 floor(a / b)
int iAlignUp (int a, int b)
 Align a to nearest higher multiple of b.
int iAlignDown (int a, int b)
 Align a to nearest lower multiple of b.
bool isBetter (float arg1, float arg2, bool maximization=false)
 Check if first value is better than the second according to maximization flag.

Detailed Description

Definition in file utilities.h.


Function Documentation

void optimizerCudaCheckError ( const char *  errorMessage,
const char *  file,
int  line,
const std::string  logger = "" 
) [inline]

Print CUDA errors.

Parameters:
errorMessagethe error to be printed
filewhich file generated the error
lineat which line
loggeron which file to log (see OptimizerLog.h)

Definition at line 26 of file utilities.h.

References FILE_LOG.

 All Classes Files Functions Variables Enumerations Enumerator Defines