Skip to content

Commit

Permalink
fun to fun_ssd
Browse files Browse the repository at this point in the history
  • Loading branch information
joethorley committed Dec 12, 2024
1 parent 15a9c7b commit cb88bf0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
4 changes: 2 additions & 2 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

fun <- function(x) {
.Call(`_ssdtools_fun`, x)
fun_ssd <- function(x) {
.Call(`_ssdtools_fun_ssd`, x)
}

18 changes: 18 additions & 0 deletions R/fun.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2023-2024 Australian Government Department of Climate Change,
# Energy, the Environment and Water
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

.ssd_fun <- function(x) {
fun_ssd(x)

Check warning on line 17 in R/fun.R

View check run for this annotation

Codecov / codecov/patch

R/fun.R#L17

Added line #L17 was not covered by tests
}
10 changes: 5 additions & 5 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// fun
double fun(double x);
RcppExport SEXP _ssdtools_fun(SEXP xSEXP) {
// fun_ssd
double fun_ssd(double x);
RcppExport SEXP _ssdtools_fun_ssd(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< double >::type x(xSEXP);
rcpp_result_gen = Rcpp::wrap(fun(x));
rcpp_result_gen = Rcpp::wrap(fun_ssd(x));
return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
{"_ssdtools_fun", (DL_FUNC) &_ssdtools_fun, 1},
{"_ssdtools_fun_ssd", (DL_FUNC) &_ssdtools_fun_ssd, 1},
{NULL, NULL, 0}
};

Expand Down
2 changes: 1 addition & 1 deletion src/fun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
using namespace Rcpp;

// [[Rcpp::export]]
double fun(double x) {
double fun_ssd(double x) {
return x;

Check warning on line 23 in src/fun.cpp

View check run for this annotation

Codecov / codecov/patch

src/fun.cpp#L22-L23

Added lines #L22 - L23 were not covered by tests
}

0 comments on commit cb88bf0

Please sign in to comment.