Displaying 20 results from an estimated 3000 matches similar to: "Rcpp and Object Factories"
2015 Jul 16
3
[LLVMdev] why LoopUnswitch pass does not constant fold conditional branch and merge blocks
Hi,
I have a general question on LoopUnswtich pass.
Consider the following IR snippet:
define i32 @test(i1 %cond) {
br label %loop_begin
loop_begin:
br i1 %cond, label %loop_body, label %loop_exit
loop_body:
br label %do_something
do_something:
call void @some_func() noreturn nounwind
br label %loop_begin
loop_exit:
ret i32 0
}
declare void @some_func() noreturn
After running
2006 May 17
9
Render No Layout?
Hi guys,
Am having a problem.
I have this def in my index controller that works like this:
def do_something
$a = variable1
$b = variable2
$c = variable3
$d = ""<script language=\"Javascript\"> \n new Insertion.Bottom(''#{$c}'',
''#{$a} - #{$b}''); \n </script>"
$trigger = "1"
render(:partial =>
2010 May 04
3
Idiomatic looping over list name, value pairs in R
Considering the python code:
for k, v in d.items(): do_something(k); do_something_else(v)
I have the following for R:
for (i in c(1:length(d))) { do_something(names(d[i]));
do_something_else(d[[i]]) }
This does not seem seems idiomatic. What is the best way of doing the
same with R?
Thanks.
Luis
2018 Jun 20
2
[RFC] Removing debug locations from ConstantSDNodes
> On Jun 19, 2018, at 6:36 PM, Reid Kleckner <rnk at google.com> wrote:
>
> On Tue, Jun 19, 2018 at 5:46 PM Vedant Kumar <vsk at apple.com <mailto:vsk at apple.com>> wrote:
> Someone (Reid?) mentioned that we could try sinking constants to their point of first use as an alternative, and (IIUC) create new nodes with distinct DebugLocs for each use of a constant. I
2007 Feb 01
4
Automatically Indexing Associated Models
PROBLEM
I have two models, Blog and BlogComment. When a blog is initially
created, it has no comments. Upon creation, the title and body are
automatically added to the ferret index and directly searchable.
However, when a comment is added to a blog, that comment does not get
added to the index and is therefore not ferretable. The desired behavior
is that when a comment is added to a blog, that the
2007 Mar 20
1
Passing Arguments to before_filter
I want to put a before_filter in application.rb, as follows:
before_filter :do_something, :except_controller => [:admin]
def do_something(options)
options.stringify_keys!
unless options[:except_controller].include?(controller_name)
# do something useful
end
end
Where I''m blocking is on how to get the ''options'' data in the do_something
method. I think I
2012 Nov 26
3
Passing lists between functions
I'd like to pass a list object created by one function as an argument of
another function. once inside the second function, I'd like to break the
list up to it's individual elements, each then identifiable by the 'names'
of the list.
The list looks something like
lst<-list(a=1, b=2, df=5, g=7)
then inside the function I've been writing a sequence of statements that
2018 Jun 20
5
[RFC] Removing debug locations from ConstantSDNodes
FWIW: Debug information on constants feels odd to me. They are just values not something that is executed so conceptually I would not expect them to "happen" at a specific time/place in the program. That said most numbers are copied into registers or stored into memory and that is of course an interesting action. So in the original example I would hope to see debug info on whatever
2018 Apr 09
3
InductiveRangeCheckElimination and BranchProbabilityInfo
Hi,
extractRangeChecksFromBranch uses BranchProbabilityInfo to decide whether its worth trying the InductiveRangeCheckElimination transformation. For the following example:
void split() {
for (int i = 0; i < 100; ++i) {
if (i < 99)
do_something()
else
do_something_else()
}
}
But the reported BPI is reported as 50/50 to whether do_something will be called, but we
2018 Jul 28
2
re-throwing an interrupt condition
I don't want to return a value, I want to interrupt the computation,
that's why I need to re-throw .
But before getting back to the user I want to run some cleanup code.
G.
On Sat, Jul 28, 2018 at 5:59 PM I?aki ?car <i.ucar86 at gmail.com> wrote:
>
> El s?b., 28 jul. 2018 a las 18:30, G?bor Cs?rdi
> (<csardi.gabor at gmail.com>) escribi?:
> >
> > Anyone
2007 Apr 11
4
Feature request... I think...
Folks-
I just started using Mocha and I wanted to try something but I
couldn''t get it to work. I''m coming from the Java world, so my
approach may not be optimal for Ruby.
Say I''m testing a.do_something() which calls b.do_other_thing() twice,
but I really don''t want to change b.do_other_thing(), just ''expect'' it
to be called twice. I know I
2009 Mar 27
0
[LLVMdev] atomic operations for ARM
Hi,
I have reworked my previous example and got something which is accepted
by tblgen:
let isCall = 1,
Defs = [R0, R1, R2, R3, R12, LR,
D0, D1, D2, D3, D4, D5, D6, D7, CPSR] in {
def ARM_ATOMIC_CMP_SWAP : ABXI<0b1011, (outs GPR:$dst), (ins
i32imm:$ptr, i32imm:$old, i32imm:$new),
"do_something",
[(set GPR:$dst,
(atomic_cmp_swap_32
2006 Mar 16
2
question about ajax/rjs and redirection
i don''t even know if this is possible, so I''ll just ask.
say I have a remote form. the form data gets submitted to the backend via
AJAX. if there is a validation error in the form, i handle that on the AJAX
side. however, if the form validates, I''d like to redirect the browser to a
different page. Will a redirect_to work with an AJAX call or do I have to
handle that
2018 Apr 10
0
InductiveRangeCheckElimination and BranchProbabilityInfo
Adding Maxim
On Apr 9, 2018, at 10:06 AM, Sam Parker via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hi,
extractRangeChecksFromBranch uses BranchProbabilityInfo to decide whether its worth trying the InductiveRangeCheckElimination transformation. For the following example:
void split() {
for (int i = 0; i < 100; ++i) {
if (i < 99)
2011 Sep 22
4
R CMD check file issues
This problem is likely to be specific to Windows, and particularly Win7.
After a successful build of a package (R CMD build addendum), I immediately
run an R CMD check for the same package.
Not always, but _very_ often, I get the following error:
C:\Users\nisabbe\Documents\@Doctoraat\R>R CMD check addendum
Loading required package: tcltk
Loading Tcl/Tk interface ... done
Loading
2011 Mar 04
3
Generic mixup?
Hello list.
This is from an R session (admittedly, I''m still using R 2.11.1):
> print
function (x, ...)
UseMethod("print")
<environment: namespace:base>
> showMethods("print")
Function "print":
<not a generic function>
Don''t the two results contradict each other? Or do I have a terrible
misunderstanding of what
2010 Sep 19
2
get time as a number
Hi, all,
How to get a time as a number?
While script is running, I want to print the elapsed time
something like TIME_AS_SECOND() in the following script
inittime <- TIME_AS_SECOND()
for (i in 1:100){
do_something(i)
curtime <- TIME_AS_SECOND()
elapsedtime <- curtime-inittime
print(paste(i, elapsedtime))
}
Thanks in advance,
Hyunchul
[[alternative HTML version
2020 Mar 19
2
valid BasicAA behavior?
Am Mi., 18. März 2020 um 18:15 Uhr schrieb Chawla, Pankaj
<pankaj.chawla at intel.com>:
>
> >> DependenceInfo is not using the AA interface correctly. Either DI has to be fixed, or another method added to AA that gives additional guarantees. Please see the bug report for details.
>
> Thanks for updating the bug report but GetUnderlyingObject() doesn't help in this case.
2007 Aug 14
4
(no subject)
How would you spec out something like the following:
def a_method
x = Class.new do
include Enumerable
end
# do something here with x
end
describe "The Anonymous Class" do
before :each do
@anonymous_class = mock Class
Class.stub!(:new).and_return @anonymous_class
end
it "should create a new anonymous class" do
2013 May 14
2
invalid operands of types ‘SEXPREC*’ and ‘R_len_t’ to binary ‘operator/’ with Rcpp.
Dear R-Developers,
I just started learning how to use Rcpp. Earlier while using it, I
encountered an error as shown below:
file74d8254b96d4.cpp: In function ‘Rcpp::NumericVector
foo(Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericVector,
Rcpp::Function, Rcpp::Function)’:
file74d8254b96d4.cpp:10: error: invalid operands of types ‘SEXPREC*’ and
‘R_len_t’ to binary ‘operator/’
make: ***