Skip to content

Commit

Permalink
version 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel authored and cran-robot committed Sep 9, 2023
1 parent 952c6ed commit f3e7812
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 18 deletions.
20 changes: 20 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2023-09-09 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Date, Version): Release 0.0.3

* .github/workflows/ci.yaml (jobs): Update to actions/checkout@v4

2023-09-08 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (LinkingTo): Add RcppInt64
* src/hasher.cpp: Use RcppInt64 package

2022-11-14 Dirk Eddelbuettel <edd@debian.org>

* .github/workflows/ci.yaml (jobs): Update to actions/checkout@v3

2021-12-10 Dirk Eddelbuettel <edd@debian.org>

* .github/workflows/ci.yaml: Add CI via run.sh from r-ci
* README.md: Add CI badge

2021-08-02 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Date, Version): Release 0.0.2
Expand Down
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: RcppFarmHash
Type: Package
Title: Interface to the Google 'FarmHash' Family of Hash Functions
Version: 0.0.2
Date: 2021-08-02
Version: 0.0.3
Date: 2023-09-09
Author: Dirk Eddelbuettel
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Description: The Google 'FarmHash' family of hash functions is used by
Expand All @@ -12,14 +12,14 @@ Description: The Google 'FarmHash' family of hash functions is used by
files written by G. Pike and copyrighted by Google, Inc.
License: GPL (>= 2)
Imports: Rcpp (>= 1.0.7)
LinkingTo: Rcpp
LinkingTo: Rcpp, RcppInt64
Suggests: bit64
URL: https://github.com/eddelbuettel/rcppfarmhash/,
https://dirk.eddelbuettel.com/code/rcpp.farmhash.html
BugReports: https://github.com/eddelbuettel/rcppfarmhash/issues
RoxygenNote: 6.0.1
Encoding: UTF-8
NeedsCompilation: yes
Packaged: 2021-08-02 12:29:14 UTC; edd
Packaged: 2023-09-09 13:16:37 UTC; edd
Repository: CRAN
Date/Publication: 2021-08-02 12:40:02 UTC
Date/Publication: 2023-09-09 14:10:02 UTC
12 changes: 6 additions & 6 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
e9b71fda6220a6753aedf8d2ac30f993 *ChangeLog
e80f62faa42d8f89614d779300c1cf13 *DESCRIPTION
f2c6b4476b5698194da1c0bc2d5486e7 *ChangeLog
bad484e150de02a3cdd08f7ed0e1aee1 *DESCRIPTION
0d574f5168fe00fc72d4405f007bf797 *NAMESPACE
ef60803b726e11ca40d070ef6c3ffb9b *R/RcppExports.R
a98d811eb418a672d450cbaef28622b5 *README.md
5e53441470431ca2d5373657f8d1e208 *build/partial.rdb
82af2f4a2d7d15e5f250f665fb8c4db2 *README.md
70a0a809d7c1e7ce1fbda2c2c2752f27 *build/partial.rdb
0a7e134aec4b20592b1006caa1ffecb9 *cleanup
a0cd955be8415a47af7c20d5a4c8b67e *configure
c6864d2572df9003b55c9af439ed2b50 *inst/AUTHORS
1a3ba2af478f7684469e0bd9b8bc97e7 *inst/NEWS.Rd
d03bbd84293136cb458b21bfaaad2327 *inst/NEWS.Rd
38f4c3c0014d62837547b5e656bb7105 *man/RcppFarmHash-package.Rd
2375de289e68943d017fa248c84fb30c *man/farmhash.Rd
291467bcd84bff5c364a7baed709b8f1 *src/RcppExports.cpp
1abc5263d2f5aced0f483ce54bd5a06f *src/farmhash.cc
25236579636597270f17ccc7558c7dfe *src/farmhash.h
ad5b04a469a2b9f7759cb38592a917f7 *src/hasher.cpp
75c43313223fa7740d5a060f6e0f1ccb *src/hasher.cpp
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

## Rcpp Interface to the Google FarmHash Family of Hash Functions

[![CI](https://github.com/eddelbuettel/rcppspdlog/actions/workflows/ci.yaml/badge.svg)](https://github.com/eddelbuettel/rcppspdlog/actions/workflows/ci.yaml)
[![License](https://eddelbuettel.github.io/badges/GPL2+.svg)](https://www.gnu.org/licenses/gpl-2.0.html)
[![CRAN](https://www.r-pkg.org/badges/version/RcppFarmHash)](https://cran.r-project.org/package=RcppFarmHash)
[![Dependencies](https://tinyverse.netlify.com/badge/RcppFarmHash)](https://cran.r-project.org/package=RcppFarmHash)
Expand Down
Binary file modified build/partial.rdb
Binary file not shown.
7 changes: 7 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
\newcommand{\ghpr}{\href{https://github.com/eddelbuettel/rcppfarmhash/pull/#1}{##1}}
\newcommand{\ghit}{\href{https://github.com/eddelbuettel/rcppfarmhash/issues/#1}{##1}}

\section{Changes in version 0.0.3 (2023-09-09)}{
\itemize{
\item Rely on new \pkg{RcppInt64} package and its header for conversion
\item Minor updates to continuous integration and README.md
}
}

\section{Changes in version 0.0.2 (2021-08-02)}{
\itemize{
\item On SunOS, set endianness to not error on \code{#include endian.h}
Expand Down
10 changes: 3 additions & 7 deletions src/hasher.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

#include <Rcpp.h>
#include <Rcpp/Lightest>
#include <RcppInt64>

#include "farmhash.h"

Expand All @@ -23,10 +24,5 @@ Rcpp::NumericVector farmhash(const std::vector<std::string> & sv) {
iv[i] = static_cast<int64_t>(util::Hash(sv[i].c_str(), sv[i].size()));
}

// see e.g. https://gallery.rcpp.org/articles/creating-integer64-and-nanotime-vectors/
Rcpp::NumericVector nv(n);
std::memcpy(&(nv[0]), &(iv[0]), n * sizeof(double));
nv.attr("class") = "integer64";

return nv;
return Rcpp::wrap(iv); // using Rcpp::wrap() from RcppInt64
}

0 comments on commit f3e7812

Please sign in to comment.