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
35b14452
Commit
35b14452
authored
7 years ago
by
stepan
Browse files
Options
Downloads
Patches
Plain Diff
Fix RMultinomNode
parent
c07c4db3
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.library/src/com/oracle/truffle/r/library/stats/RMultinomNode.java
+6
-1
6 additions, 1 deletion
...src/com/oracle/truffle/r/library/stats/RMultinomNode.java
with
6 additions
and
1 deletion
com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/stats/RMultinomNode.java
+
6
−
1
View file @
35b14452
...
...
@@ -70,7 +70,7 @@ public abstract class RMultinomNode extends RExternalBuiltinNode.Arg3 {
return
RError
.
SHOW_CALLER
;
}
@Specialization
@Specialization
(
guards
=
"probsAccess.supports(probs)"
)
protected
RIntVector
doMultinom
(
int
n
,
int
size
,
RAbstractDoubleVector
probs
,
@Cached
(
"probs.access()"
)
VectorAccess
probsAccess
)
{
try
(
SequentialIterator
probsIter
=
probsAccess
.
access
(
probs
))
{
...
...
@@ -136,4 +136,9 @@ public abstract class RMultinomNode extends RExternalBuiltinNode.Arg3 {
return
resultVec
;
}
}
@Specialization
(
replaces
=
"doMultinom"
)
protected
RIntVector
doMultinomGeneric
(
int
n
,
int
size
,
RAbstractDoubleVector
probs
)
{
return
doMultinom
(
n
,
size
,
probs
,
VectorAccess
.
createSlowPath
(
probs
));
}
}
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