Add new package: fastdb (#18308)
This commit is contained in:
parent
62128f1351
commit
e09d906a35
@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/examples/testtimeseries.cpp b/examples/testtimeseries.cpp
|
||||||
|
index 1f57bac..e3ed88e 100644
|
||||||
|
--- a/examples/testtimeseries.cpp
|
||||||
|
+++ b/examples/testtimeseries.cpp
|
||||||
|
@@ -47,8 +47,8 @@ REGISTER_TEMPLATE(DailyBlock);
|
||||||
|
REGISTER(Stock);
|
||||||
|
|
||||||
|
inline int random(unsigned mod) { return rand() % mod; }
|
||||||
|
-inline float fmax(float x, float y) { return x > y ? x : y; }
|
||||||
|
-inline float fmin(float x, float y) { return x < y ? x : y; }
|
||||||
|
+inline float my_fmax(float x, float y) { return x > y ? x : y; }
|
||||||
|
+inline float my_fmin(float x, float y) { return x < y ? x : y; }
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
@@ -66,8 +66,8 @@ int main(int argc, char* argv[])
|
||||||
|
quote.timestamp = i;
|
||||||
|
quote.open = (float)random(10000)/100;
|
||||||
|
quote.close = (float)random(10000)/100;
|
||||||
|
- quote.high = fmax(quote.open, quote.close);
|
||||||
|
- quote.low = fmin(quote.open, quote.close);
|
||||||
|
+ quote.high = my_fmax(quote.open, quote.close);
|
||||||
|
+ quote.low = my_fmin(quote.open, quote.close);
|
||||||
|
quote.volume = random(1000);
|
||||||
|
proc.add(stockId, quote); // add new element in time series
|
||||||
|
}
|
22
var/spack/repos/builtin/packages/fastdb/package.py
Normal file
22
var/spack/repos/builtin/packages/fastdb/package.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
|
class Fastdb(MakefilePackage):
|
||||||
|
"""Object-Relational Main-Memory Embedded Database system
|
||||||
|
tightly integrated with C++ language."""
|
||||||
|
|
||||||
|
homepage = "https://sourceforge.net/projects/fastdb/"
|
||||||
|
url = "https://sourceforge.net/projects/fastdb/files/fastdb/3.75/fastdb-3.75.tar.gz"
|
||||||
|
|
||||||
|
version('3.75', sha256='eeafdb2ad01664c29e2d4053a305493bdedc8e91612ab25f1d36ad2f95b0dad6')
|
||||||
|
version('3.74', sha256='4d0c9a165a1031860d4853d7084b8fe4627f0004861e6070927d3b6c594af889')
|
||||||
|
|
||||||
|
patch('fastdb-fmax-fmin.patch')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
make('PREFIX=%s' % prefix, 'install')
|
Loading…
Reference in New Issue
Block a user