OmniSciDB  04ee39c94c
ProfileTest.h File Reference

Unit tests for microbenchmark. More...

#include "../QueryEngine/GpuRtConstants.h"
#include "../Shared/Logger.h"
#include <vector>
#include <unistd.h>
#include <algorithm>
+ Include dependency graph for ProfileTest.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  DEV_KIND { CPU, GPU }
 
enum  DIST_KIND {
  INVALID, NRM, EXP1, EXP2,
  UNI, POI
}
 
enum  OP_KIND { OP_COUNT, OP_SUM, OP_MIN, OP_MAX }
 

Functions

long cpu_threads ()
 

Detailed Description

Unit tests for microbenchmark.

Author
Minggang Yu miyu@.nosp@m.mapd.nosp@m..com Copyright (c) 2016 MapD Technologies, Inc. All rights reserved.

Definition in file ProfileTest.h.

Enumeration Type Documentation

◆ DEV_KIND

enum DEV_KIND
Enumerator
CPU 
GPU 

Definition at line 60 of file ProfileTest.h.

60 { CPU, GPU };

◆ DIST_KIND

enum DIST_KIND
Enumerator
INVALID 
NRM 
EXP1 
EXP2 
UNI 
POI 

Definition at line 62 of file ProfileTest.h.

62 { INVALID, NRM, EXP1, EXP2, UNI, POI };

◆ OP_KIND

enum OP_KIND
Enumerator
OP_COUNT 
OP_SUM 
OP_MIN 
OP_MAX 

Definition at line 64 of file ProfileTest.h.

Function Documentation

◆ cpu_threads()

long cpu_threads ( )
inline

Definition at line 52 of file ProfileTest.h.

52  {
53  // could use std::thread::hardware_concurrency(), but some
54  // slightly out-of-date compilers (gcc 4.7) implement it as always 0.
55  // Play it POSIX.1 safe instead.
56  return std::max(2 * sysconf(_SC_NPROCESSORS_CONF), 1L);
57 }