strider

A strided iterator-adapter for scanning multidimensional legacy buffers in C++

https://github.com/thk686/strider

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary

Keywords

cpp iterators r
Last synced: 6 months ago · JSON representation

Repository

A strided iterator-adapter for scanning multidimensional legacy buffers in C++

Basic Info
  • Host: GitHub
  • Owner: thk686
  • License: other
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 148 KB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
cpp iterators r
Created over 8 years ago · Last pushed over 5 years ago
Metadata Files
Readme License

README.Rmd

---
title: "Strider"
author: "Timothy H. Keitt"
date: "`r Sys.Date()`"
output: github_document
---

"I don't think he knows about second breakfast" - Meriadoc 'Merry' Brandybuck

Adapting multidimensional legacy buffers to the C++ standard library is difficult owing to a lack of strided (address-skipping) iterators. **Strider** provides an address-skipping pointer adapter. It can be used to scan multidimensional data along any desired margin using the standard library algorithms.

This code snippet computes row sums of a matrix.

```{Rcpp eval=FALSE}
  for_each(make_strided(begin(x), nr), make_strided(end(x)), [&](const double& y) {
    transform(&y, &y + nr, begin(res), begin(res), plus()); });
```

It is cache and compiler friendly and runs nearly four times faster than R's built-in ```rowSums``` function. See [the vignette](https://thk686.github.io/strider/articles/strider.html) for details.

[The header file](https://github.com/thk686/strider/blob/master/inst/include/strider.h) is stand-alone and can be used separate from [R](https://www.r-project.org). It relies on the [Boost iterator library](https://www.boost.org/doc/libs/release/libs/iterator/).

#### Installation

```
devtools::install_github("thk686/strider")
```

 
 
 [![Travis build status](https://travis-ci.org/thk686/strider.svg?branch=master)](https://travis-ci.org/thk686/strider) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/thk686/strider?branch=master&svg=true)](https://ci.appveyor.com/project/thk686/strider) [![Coverage status](https://codecov.io/gh/thk686/strider/branch/master/graph/badge.svg)](https://codecov.io/github/thk686/strider?branch=master) [![DOI](https://zenodo.org/badge/109467352.svg)](https://zenodo.org/badge/latestdoi/109467352)
 
 

Owner

  • Name: Tim Keitt
  • Login: thk686
  • Kind: user
  • Location: Austin, Texas
  • Company: University of Texas at Austin

I am a Professor at UT Austin

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 102
  • Total Committers: 1
  • Avg Commits per committer: 102.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Tim Keitt t****t@g****m 102

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 238 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: strider

Strided Iterator and Range

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 238 Last month
Rankings
Stargazers count: 26.2%
Forks count: 28.8%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 37.1%
Downloads: 65.0%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • Rcpp >= 0.12.13 imports
  • BH * suggests
  • covr * suggests
  • dplyr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • microbenchmark * suggests
  • rmarkdown * suggests
  • testthat * suggests