FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpp11/cpp11test/src/add.cpp at main · josh28x/cpp11 · GitHub
josh28x
cpp11
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpp11
/
cpp11test
/
src
/
add.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
11 lines (9 loc) · 242 Bytes
Breadcrumbs
cpp11
/
cpp11test
/
src
/
add.cpp
Copy path
File metadata and controls
11 lines (9 loc) · 242 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
#
include
"
cpp11/doubles.hpp
"
[[cpp11::register]]
SEXP
cpp11_add_vec_for_
(cpp11::writable::doubles x,
double
num) {
R_xlen_t n = x.
size
();
for
(R_xlen_t i =
0
; i < n; ++i) {
double
cur = x[i];
x[i] = cur + num;
}
return
x;
}
Back
|
FazBrowse Home
|
New Git URL