Displaying 16 results from an estimated 16 matches for "setint".
Did you mean:
setidt
2018 Apr 04
2
llvm::PointerIntPair -- is this by design or a bug?
llvm::PointerIntPair<double*, 3, signed> P;
P.setInt(-4);
Ideally, the value range for a 3-bit signed integer should be [-4,3]. But the above call to setInt will fail. Essentially, the signed int field in PointerIntPair is behaving the same as an 3-bit unsigned field which has the legal value range of [0,7]. Is this by design? Are negative values...
2018 Apr 04
2
llvm::PointerIntPair -- is this by design or a bug?
On 4 Apr 2018, at 11:01, Florian Hahn via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hi,
>
> On 04/04/2018 05:34, Riyaz Puthiyapurayil via llvm-dev wrote:
>> llvm::PointerIntPair<double*, 3, signed> P;
>> P.setInt(-4);
>> Ideally, the value range for a 3-bit signed integer should be [-4,3]. But the above call to setInt will fail. Essentially, the signed int field in PointerIntPair is behaving the same as an 3-bit unsigned field which has the legal value range of [0,7]. Is this by design? Are negative v...
2018 Apr 05
1
llvm::PointerIntPair -- is this by design or a bug?
I do agree that sign-extension is the right thing to do. Unlike bit-fields, llvm::PointerIntPair has asserts checking that the int value is within range. So if you assign an out of range value, it should fail with an assertion:
llvm::PointerIntPair<SomeType*, 3, int> pip;
pip.setInt(7); // can be made to fail as the valid range
// of signed 3-bit values is [-4:3]
The above code does not currently fail and instead fails for pip.setInt arguments with values in [-4:-1] which is actually unexpected and the reason I started this email thread.
/Riyaz
From: David Za...
2018 Apr 04
0
llvm::PointerIntPair -- is this by design or a bug?
Hi,
On 04/04/2018 05:34, Riyaz Puthiyapurayil via llvm-dev wrote:
> llvm::PointerIntPair<double*, 3, signed> P;
>
> P.setInt(-4);
>
> Ideally, the value range for a 3-bit signed integer should be [-4,3].
> But the above call to setInt will fail. Essentially, the signed int
> field in PointerIntPair is behaving the same as an 3-bit unsigned field
> which has the legal value range of [0,7]. Is this by de...
2018 Apr 04
3
llvm::PointerIntPair -- is this by design or a bug?
Rather than “fixing” it, it might be better to support a separate method for signed extension. My reasoning is as follows:
int x = 7;
llvm::PointerIntPair<double*, 3, int> pip;
pip.setInt(x);
There could be code out there that expects pip.getInt() to return 7 and not -1.
So if you really want to set a negative and return a negative value, a separate method setSignedInt and getSignedInt may be OK. Further, sign-extension would need two shift instructions in X86 as opposed to no-sig...
2018 Apr 04
2
llvm::PointerIntPair -- is this by design or a bug?
...ys.com> wrote:
>
>> Rather than “fixing” it, it might be better to support a separate method
>> for signed extension. My reasoning is as follows:
>>
>>
>>
>> int x = 7;
>>
>> llvm::PointerIntPair<double*, 3, int> pip;
>>
>> pip.setInt(x);
>>
>>
>>
>> There could be code out there that expects pip.getInt() to return 7 and
>> not -1.
>>
>>
>>
>> So if you really want to set a negative and return a negative value, a
>> separate method setSignedInt and getSignedInt may be O...
2018 Apr 04
2
llvm::PointerIntPair -- is this by design or a bug?
...On 04/04/2018 11:15, David Chisnall wrote:
On 4 Apr 2018, at 11:01, Florian Hahn via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hi,
On 04/04/2018 05:34, Riyaz Puthiyapurayil via llvm-dev wrote:
llvm::PointerIntPair<double*, 3, signed> P;
P.setInt(-4);
Ideally, the value range for a 3-bit signed integer should be [-4,3]. But the above call to setInt will fail. Essentially, the signed int field in PointerIntPair is behaving the same as an 3-bit unsigned field which has the legal value range of [0,7]. Is this by design? Are negative values not...
2018 Apr 04
0
llvm::PointerIntPair -- is this by design or a bug?
The sign extension is correct. Otherwise setInt(-1) won’t work. If you don’t want sign extension, then use ‘unsigned’ and not ‘int’ in the template arguments.
> On Apr 4, 2018, at 14:34, Reid Kleckner via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> I'd argue that bitfield sign extensions are surprising and are usually a...
2018 Apr 04
0
llvm::PointerIntPair -- is this by design or a bug?
...David Chisnall wrote:
> On 4 Apr 2018, at 11:01, Florian Hahn via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> Hi,
>>
>> On 04/04/2018 05:34, Riyaz Puthiyapurayil via llvm-dev wrote:
>>> llvm::PointerIntPair<double*, 3, signed> P;
>>> P.setInt(-4);
>>> Ideally, the value range for a 3-bit signed integer should be [-4,3]. But the above call to setInt will fail. Essentially, the signed int field in PointerIntPair is behaving the same as an 3-bit unsigned field which has the legal value range of [0,7]. Is this by design? Are negati...
2018 Apr 04
0
llvm::PointerIntPair -- is this by design or a bug?
...David Chisnall wrote:
>
> On 4 Apr 2018, at 11:01, Florian Hahn via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>
> Hi,
>
>
> On 04/04/2018 05:34, Riyaz Puthiyapurayil via llvm-dev wrote:
>
> llvm::PointerIntPair<double*, 3, signed> P;
>
> P.setInt(-4);
>
> Ideally, the value range for a 3-bit signed integer should be [-4,3]. But
> the above call to setInt will fail. Essentially, the signed int field in
> PointerIntPair is behaving the same as an 3-bit unsigned field which has
> the legal value range of [0,7]. Is this by design...
2018 Apr 04
0
llvm::PointerIntPair -- is this by design or a bug?
...apurayil <
Riyaz.Puthiyapurayil at synopsys.com> wrote:
> Rather than “fixing” it, it might be better to support a separate method
> for signed extension. My reasoning is as follows:
>
>
>
> int x = 7;
>
> llvm::PointerIntPair<double*, 3, int> pip;
>
> pip.setInt(x);
>
>
>
> There could be code out there that expects pip.getInt() to return 7 and
> not -1.
>
>
>
> So if you really want to set a negative and return a negative value, a
> separate method setSignedInt and getSignedInt may be OK. Further,
> sign-extension would ne...
2005 Apr 14
1
question about "R get vector from C"
Dear ALL-R helpers,
I want to let R get vector from c ,for example :numeric array ,vector .I saw
some exmple like this :
/* useCall3.c */
/* Getting an integer vector from C using .Call */
#include <R.h>
#include <Rdefines.h>
SEXP setInt() {
SEXP myint;
int *p_myint;
int len = 5;
PROTECT(myint = NEW_INTEGER(len)); // Allocating storage space
p_myint = INTEGER_POINTER(myint);
p_myint[0] = 7;
UNPROTECT(1);
return myint;
}
then type at the command prompt:
R CMD SHLIB useCall3.c
to get useCall3.so
In windows p...
2019 Feb 15
0
Wine release 4.2
..._relative_addressing() a bit.
Michael Müller (2):
ntoskrnl.exe: Implement ExInitializeNPagedLookasideList.
ntoskrnl.exe: Implement NtBuildNumber.
Michael Stefaniuc (16):
webservices: Delete duplicated return value checks.
d3dx9/tests: Actually test the return of the effect SetInt() call.
kernelbase: Avoid TRUE : FALSE conditional expressions.
taskschd: Avoid TRUE : FALSE conditional expressions.
dmime/tests: Test the return value of IDirectMusic_SetDirectSound().
gdi32: Avoid TRUE : FALSE conditional expressions.
odbc32: Print the debug strings...
2011 Dec 30
0
Wine release 1.3.36
...est.
d3dx9/tests: Add effect parameter value GetBool() test.
d3dx9/tests: Add effect parameter value GetBoolArray() test.
d3dx9/tests: Add effect parameter value GetInt() test.
d3dx9/tests: Add effect parameter value GetIntArray() test.
d3dx9: Simplify ID3DXBaseEffect::SetInt().
d3dx9: Use a loop in get_vector().
d3dx9/tests: Add effect parameter value GetFloat() test.
d3dx9/tests: Add effect parameter value GetFloatArray() test.
d3dx9/tests: Add effect parameter value GetVector() test.
d3dx9/tests: Add effect parameter value GetVectorArray...
2011 Dec 02
0
Wine release 1.3.34
...exiting.
advapi32: Send shutdown notification to services.
Rico Sch?ller (11):
d3dx9: Handle a special case in ID3DXBaseEffect::GetInt().
d3dx9: Implement ID3DXBaseEffect::SetFloat().
d3dx9: Implement ID3DXBaseEffect::SetFloatArray().
d3dx9: Implement ID3DXBaseEffect::SetInt().
d3dx9: Implement ID3DXBaseEffect::SetIntArray().
d3dx9: Implement ID3DXBaseEffect::SetBool().
d3dx9: Implement ID3DXBaseEffect::SetBoolArray().
d3dx9: Implement ID3DXBaseEffect::SetMatrix().
d3dx9: Implement ID3DXBaseEffect::SetMatrixArray().
d3dx9: Implement...
2012 Jan 27
1
Wine release 1.4-rc1
...ee_constant_table().
d3dx9: Get rid of ID3DXConstantTableImpl typedef.
d3dx9: Reorder argument check in D3DXGetShaderConstantTableEx().
d3dx9: Fix constant table trace.
d3dx9/tests: Add effect parameter value SetBoolArray() test.
d3dx9/tests: Add effect parameter value SetInt() test.
d3dx9/tests: Add effect parameter value SetIntArray() test.
d3dx9/tests: Add effect parameter value SetFloat() test.
d3dx9/tests: Add effect parameter value SetFloatArray() test.
d3dx9/tests: Add effect parameter value SetVector() test.
d3dx9/tests: Add effect...