Displaying 4 results from an estimated 4 matches for "method_2".
Did you mean:
method2
2009 Mar 17
11
Refactoring module
Dear all
Please see the following module, In module SX3 SX4 and SX5 have similar
class Tasklist, but inherit from different class.
I will use the following code to connect to different data sources
RemoteSX3Model.establish_connection sx3_hash
RemoteSX4Model.establish_connection sx4_hash
RemoteSX5Model.establish_connection sx5_hash
How can I refactor my code in module to look simpler? Thank you
2008 Feb 03
1
Defer multiple methods within the same worker to the thread pool?
Within a threaded worker, I would like to have multiple methods. Will
the following code work?
def method_1(args)
thread_pool.defer(args) do |args|
#work
end
end
def method_2(args)
thread_pool.defer(args) do |args|
#work
end
end
. . . or, should I have one "meta"-method and pass which sub-method
to perform via args?
def meta_method(args)
thread_pool.defer(args) do |args|
if args[:method] == "method_1"
#do work
end...
2015 May 31
4
[LLVMdev] Hash Table Virtual Calls with Conflict Resolution Stubs
...gister) on the caller side to a
larger integer hash value (a large enough space in which collisions
are assumed not to occur) and then generating a 'conflict resolution
stub', which does something like:
conflict_resolution_stub:
cmp eax, <METHOD 1 HASH>
jne .method_2
.method_1:
jmp method_1
.method_2:
jmp method_2
So in this case 'eax' is being used for conflict resolution and a
simple comparison can distinguish the two methods. The nice aspect of
this approach is that collisions aren't expected to occur in most
cases...
2014 Jan 16
3
[LLVMdev] Do all user-written passes have to be run through a PassManager object (called from outside the LLVM infrastructure)?
...valent in terms of executing
those self-written passes and getting the correct results:
#if METHOD_1
PassManager PM;
PM.add(new Analyzeind(F));
PM.run(*M);
#else //METHOD_2
AnalyzeKind *abk = new AnalyzeKind(F);
abk->runOnFunction(*F);
#endif
However, I found that if my own pass has requirements, e.g.
AU.addRequired<DominatorTree>();...