Displaying 4 results from an estimated 4 matches for "sortfunc".
2019 Jul 08
2
Using bytecode version of std::sort for JIT generated data type
Thanks David!
I am not clear on how to achieve this though. Could you give more info on
this?
I expect something like this:
sort.cc file:
bool Compare(void* a, void* b) {
return false;
}
void SortFunc(void* arr, int len) {
std::sort(arr, len, &Compare)
}
$MAGIC_COMMAND sort.cc -o a.llvm
a.llvm is a bytecode which can be loaded at runtime in my JIT module and
write some code to replace "Compare" function with our own "Compare"
function.
On Mon, Jul 8, 2019 at 1:17...
2019 Jul 09
2
Using bytecode version of std::sort for JIT generated data type
...d!
>>
>> I am not clear on how to achieve this though. Could you give more info on
>> this?
>>
>> I expect something like this:
>>
>> sort.cc file:
>>
>> bool Compare(void* a, void* b) {
>> return false;
>> }
>>
>> void SortFunc(void* arr, int len) {
>> std::sort(arr, len, &Compare)
>> }
>>
>> $MAGIC_COMMAND sort.cc -o a.llvm
>>
>> a.llvm is a bytecode which can be loaded at runtime in my JIT module and
>> write some code to replace "Compare" function with our own...
2019 Jul 10
2
Using bytecode version of std::sort for JIT generated data type
...nfo
>>>> on this?
>>>>
>>>> I expect something like this:
>>>>
>>>> sort.cc file:
>>>>
>>>> bool Compare(void* a, void* b) {
>>>> return false;
>>>> }
>>>>
>>>> void SortFunc(void* arr, int len) {
>>>> std::sort(arr, len, &Compare)
>>>> }
>>>>
>>>> $MAGIC_COMMAND sort.cc -o a.llvm
>>>>
>>>> a.llvm is a bytecode which can be loaded at runtime in my JIT module
>>>> and write some co...
2019 Jul 03
2
Using bytecode version of std::sort for JIT generated data type
Thanks David! I understand that std::sort doesn't exist without types
especially at bytecode layer.
What I was thinking was something like the following:
Compile std::sort with a thunk function Compare(void*, void*) {rerturn
false} into bytecode with an option say noinline and always make the
function call or even a simple unoptimized bytecode which guarantees that
Compare exists as a