Displaying 18 results from an estimated 18 matches for "any_of".
Did you mean:
all_of
2011 Dec 06
1
mongodb topic in rails
Hi
I use mongoid for rails application
and I try to do
@users = User.where("first_name = ? OR last_name = ? OR type = ?",
firstname, lastname, usertype)
but I am getting error
but when i put:
@users = User.where(:first_name => firstname, :last_name => lastname,
:type => usertype).all
the program run successfully
but i need OR to execute in mongodb
Also I need sql LIKE to
2006 Jun 30
3
New release of ez-where plugin
...th title, body or extended LIKE "%#{params
[:search]}%"
# AND (author.name = params[:author] OR comment.body LIKE "%#{params
[:search]}%")
@articles = Article.find_where(:all, :include => [:author,
{ :comments => :users }]) do
|article, author, comment|
article.any_of(:title, :body, :extended) =~ "%#{params[:search]}%"
any {
author.name == params[:author]
comment.body =~ "%#{params[:search]}%"
}
end
=>["(articles.title LIKE ? OR articles.body LIKE ?
OR articles.extended LIKE ?) AND ((authors.name = ?)
OR (c...
2017 Feb 03
2
RFC: Generic IR reductions
...ors, which can be applicable to other targets than SVE
>> for things like early-exit vectorization. Simon mentioned this to me
>> off-list. Simon, could you comment here if this proposal would work
>> for your needs?
>
> Yes - I’m hoping that we can both vectorise early-out ‘any_of’ predicate tests code and perform early-out breaks from already vectorised cases - nothing I’ve seen suggests this will get in the way. It’s mainly going to be a case of correct recognition in the LV, handling dereference’d arrays etc. and I don’t think these intrinsics will obfuscate these cases/a...
2017 Nov 10
2
Less aggressive on the first allocation of CSR if detecting an early exit
...avour splitting in blocks that we'd
> prefer not to have a prologue in (or before).
>
> Then a CFG such as this:
> A
> / \
> B C
> | / \
> | D E
> | | /
> | | /
> | |/
> | /
> |/
> F
>
> - Assume calls are in B and ANY_OF(C,D,E): CSR allocation is cheap
> everywhere
>
> - Assume calls are in C or ALL_OF(D,E): CSR allocation is cheap in
> ALL_OF(C,D,E); CSR allocation is expensive in ALL_OF(A,B,F)
>
> - Assume only call is in ANY_OF(B,D,E): CSR allocation is cheap only
> in that block, expensiv...
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
...t; marker. But that happens for most calls. We can only really transform a franction of those into real tail calls later.
Thanks, so back to my original point: if we have to disable the CSR optimization on function that “may be tail called”, it would still be better IMO to do something like `llvm::any_of(callsites, isTailCall)` instead of IsEligibleForTailCallOptimization().
—
Mehdi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160628/75660b11/attachment.html>
2017 Nov 16
2
Less aggressive on the first allocation of CSR if detecting an early exit
...rologue in (or before).
>>> Then a CFG such as this:
>>> A
>>> / \
>>> B C
>>> | / \
>>> | D E
>>> | | /
>>> | | /
>>> | |/
>>> | /
>>> |/
>>> F
>>> - Assume calls are in B and ANY_OF(C,D,E): CSR allocation is cheap
>>> everywhere
>>> - Assume calls are in C or ALL_OF(D,E): CSR allocation is cheap in
>>> ALL_OF(C,D,E); CSR allocation is expensive in ALL_OF(A,B,F)
>>> - Assume only call is in ANY_OF(B,D,E): CSR allocation is cheap
>>>...
2017 Oct 31
2
Less aggressive on the first allocation of CSR if detecting an early exit
On 2017-10-30 21:20, Hal Finkel wrote:
> On 10/30/2017 12:20 PM, junbuml at codeaurora.org wrote:
>> On 2017-10-27 19:50, Hal Finkel wrote:
>>> On 10/27/2017 03:32 PM, Jun Lim via llvm-dev wrote:
>>>
>>>> When compiling C code below for AArach64, I saw that shrink-wrapping
>>>> didn't happen due to the very early uses of CSRs in the entry
2017 Nov 17
2
Less aggressive on the first allocation of CSR if detecting an early exit
...blocks that we'd
>> prefer not to have a prologue in (or before).
>> Then a CFG such as this:
>> A
>> / \
>> B C
>> | / \
>> | D E
>> | | /
>> | | /
>> | |/
>> | /
>> |/
>> F
>> - Assume calls are in B and ANY_OF(C,D,E): CSR allocation is cheap
>> everywhere
>> - Assume calls are in C or ALL_OF(D,E): CSR allocation is cheap in
>> ALL_OF(C,D,E); CSR allocation is expensive in ALL_OF(A,B,F)
>> - Assume only call is in ANY_OF(B,D,E): CSR allocation is cheap
>> only
>> in tha...
2016 Jun 29
0
Tail call optimization is getting affected due to local function related optimization with IPRA
...or most calls. We can only
> really transform a franction of those into real tail calls later.
>
>
> Thanks, so back to my original point: if we have to disable the CSR
> optimization on function that “may be tail called”, it would still be
> better IMO to do something like `llvm::any_of(callsites, isTailCall)`
> instead of IsEligibleForTailCallOptimization().
>
> —
> Mehdi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160629/dc8cede9/attachment.html>
2007 Sep 24
7
Parameter Matchers with optional params
...parameter matchers, or some way to
define optional parameters? I''m trying to match something like:
.find( 42 ) || .find( 42, {:conditions=>nil,:includes=>nil} )
Or for that matter, 42 followed by nothing or anything... Halp? I''ve
tried different nested combos with any_of/all_of/anything, but
getting lost trying.
--Andrew Vit
2017 Feb 02
3
RFC: Generic IR reductions
Thanks for the summary, some more comments inline.
On 1 February 2017 at 22:02, Renato Golin <renato.golin at linaro.org> wrote:
> On 1 February 2017 at 21:22, Saito, Hideki <hideki.saito at intel.com> wrote:
>> I think we are converging enough at the detail level, but having a big
>> difference in the opinions at the "vision" level. :)
>
> Vision is
2016 Jun 28
0
Tail call optimization is getting affected due to local function related optimization with IPRA
> On Jun 28, 2016, at 11:34 AM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
>
>
> Sent from my iPhone
>
> On Jun 28, 2016, at 2:27 PM, Matthias Braun <matze at braunis.de <mailto:matze at braunis.de>> wrote:
>
>>
>>> On Jun 28, 2016, at 10:09 AM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org
2009 Dec 03
0
[LLVMdev] patch for portability
...tandard is introducing several new generic free functions in several existing headers:
<iterator>
next
prev
begin
end
<utility>
move
forward
<memory>
addressof
undeclare_reachable
<functional>
ref
cref
bind
<algorithm>
all_of
any_of
none_of
move
copy_if
<numeric>
iota
(this is not a complete list). Additionally when /any/ two libraries are mixed (e.g. llvm and boost), there is a large potential for name clashes even when namespaces are judiciously used. The carefully crafted C++ library should be aware of...
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
Sent from my iPhone
> On Jun 28, 2016, at 2:27 PM, Matthias Braun <matze at braunis.de> wrote:
>
>
>> On Jun 28, 2016, at 10:09 AM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>>
>>
>> Sent from my iPhone
>>
>>> On Jun 28, 2016, at 12:53 PM, vivek pandya <vivekvpandya at gmail.com> wrote:
2009 Dec 03
3
[LLVMdev] patch for portability
Sorry, always end up not replying to the list:
The main issue with dealing with next this way is that people adding new
uses of next will probably not be using c++0x and therefore won't know it's
ambiguous and that it needs to be qualified.
There are also two issues with rvalue references and the STL:
1. EquivalenceClasses, in the insert and findLeader functions, it uses map
functions
2014 Mar 05
3
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
On 2014 Mar 4, at 20:23, Chandler Carruth <chandlerc at google.com> wrote:
> On Tue, Mar 4, 2014 at 8:07 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> There’s a decent selection of range adaptors in Boost.Range [1]. I’m not sure the license [2] allows copying the source (IANAL), but any reason not use the same names? I don’t see any reason to reinvent the
2006 Jun 19
6
SQL Search Qustion
I am working on writing a search method where a user can type a string
of words and I return all the objects that have fields that match all of
the words in one or a combination of fields.
Person
first_name
last_name
Pet
name
Person has_many :pets
I want to write some SQL so that if I search for "Tony AAAA" I will get
all the people who have Tony and AAA either in their
2006 Jul 02
18
JOIN conditions
Hi,
how can I get Rails to generate SQL queries with conditions in the JOIN clause?
What I would want is:
SELECT * FROM people p
LEFT OUTER JOIN jobs j (p.job_id = j.id AND j.salary > 9999999)
I tried
People.find(:all, :include => ''jobs'', :conditions => ''jobs.salary > 9999999'')
but that generates
SELECT * FROM people p
LEFT OUTER