Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
9c5dd8e3
Commit
9c5dd8e3
authored
8 years ago
by
Adam Welc
Browse files
Options
Downloads
Patches
Plain Diff
Rewritten parameter casts for the .fastr.dqrls builtin.
parent
8ea4b7d4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastrDqrls.java
+14
-0
14 additions, 0 deletions
.../com/oracle/truffle/r/nodes/builtin/fastr/FastrDqrls.java
with
14 additions
and
0 deletions
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastrDqrls.java
+
14
−
0
View file @
9c5dd8e3
...
...
@@ -11,6 +11,7 @@
*/
package
com.oracle.truffle.r.nodes.builtin.fastr
;
import
static
com
.
oracle
.
truffle
.
r
.
nodes
.
builtin
.
CastBuilder
.
Predef
.*;
import
static
com
.
oracle
.
truffle
.
r
.
runtime
.
RVisibility
.
OFF
;
import
static
com
.
oracle
.
truffle
.
r
.
runtime
.
builtins
.
RBehavior
.
PURE
;
import
static
com
.
oracle
.
truffle
.
r
.
runtime
.
builtins
.
RBuiltinKind
.
PRIMITIVE
;
...
...
@@ -19,6 +20,7 @@ import java.util.Arrays;
import
com.oracle.truffle.api.dsl.Cached
;
import
com.oracle.truffle.api.dsl.Specialization
;
import
com.oracle.truffle.r.nodes.builtin.CastBuilder
;
import
com.oracle.truffle.r.nodes.builtin.RBuiltinNode
;
import
com.oracle.truffle.r.nodes.unary.CastDoubleNode
;
import
com.oracle.truffle.r.runtime.builtins.RBuiltin
;
...
...
@@ -45,6 +47,18 @@ public abstract class FastrDqrls extends RBuiltinNode {
private
final
RAttributeProfiles
xAttributeProfiles
=
RAttributeProfiles
.
create
();
private
final
RAttributeProfiles
residualsAttributesProfiles
=
RAttributeProfiles
.
create
();
@Override
protected
void
createCasts
(
CastBuilder
casts
)
{
casts
.
arg
(
"x"
).
asDoubleVector
(
true
,
true
,
true
);
casts
.
arg
(
"n"
).
asIntegerVector
().
findFirst
();
casts
.
arg
(
"p"
).
asIntegerVector
().
findFirst
();
casts
.
arg
(
"y"
).
asDoubleVector
(
true
,
true
,
true
);
casts
.
arg
(
"ny"
).
asIntegerVector
().
findFirst
();
casts
.
arg
(
"tol"
).
asDoubleVector
().
findFirst
();
casts
.
arg
(
"coeff"
).
asDoubleVector
(
true
,
true
,
true
);
}
@Specialization
public
RList
doDouble
(
RAbstractDoubleVector
xVec
,
int
n
,
int
p
,
RAbstractDoubleVector
yVec
,
int
ny
,
double
tol
,
RAbstractDoubleVector
coeffVec
)
{
return
call
(
xVec
,
xVec
.
materialize
(),
n
,
p
,
yVec
,
yVec
.
materialize
(),
ny
,
tol
,
coeffVec
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment