Displaying 10 results from an estimated 10 matches for "classtype".
Did you mean:
class_type
2009 Sep 15
2
best method to format output of frequency table
I have some security alert log data that I'm parsing and doing some stats on.
One of the fields is the "Classtype" which is the enumerated value of the
type of alert found.
classtypes = factor( alerts$Classtype )
fclass_types = table( classtypes )
fclass_types gives me a frequency table of the intrusion types:
fclass_types
classtypes
attempted-admin attempted-...
2012 Oct 02
2
[LLVMdev] Offset to C++ structure members
...uld be easy to write a "thunk" wrapper to call it. However, assume that there is no such S member function. I therefore need a way to get the offset of 'b' and add it to 's' so that I can call T_string_M_assign_Pv() on it.
Given this helper function:
template<class ClassType,class MbrType> inline
ptrdiff_t mbr_offset_of( MbrType ClassType::*p ) {
ClassType const *const c = static_cast<ClassType*>( nullptr );
return reinterpret_cast<ptrdiff_t>( &(c->*p) );
}
I could take a Pointer to an S, use ptrtoint, add the offset, use inttoptr, and us...
2012 Oct 02
2
[LLVMdev] Offset to C++ structure members
...virtual bases involved.
Really? This simple code works just fine:
struct A { int ai; };
struct X : virtual A { int xi; };
struct Y : virtual A { int yi; };
struct S : X, Y {
string a;
string b;
};
template<class ClassType,class MbrType> inline
ptrdiff_t mbr_offset_of( MbrType ClassType::*p ) {
ClassType const *const c = static_cast<ClassType*>( nullptr );
return reinterpret_cast<ptrdiff_t>( &(c->*p) );
}
int main() {
ptrdiff_t offset = mbr_...
2012 Oct 02
0
[LLVMdev] Offset to C++ structure members
...uot;thunk" wrapper to call it. However, assume that there is no such S member function. I therefore need a way to get the offset of 'b' and add it to 's' so that I can call T_string_M_assign_Pv() on it.
>
> Given this helper function:
>
> template<class ClassType,class MbrType> inline
> ptrdiff_t mbr_offset_of( MbrType ClassType::*p ) {
> ClassType const *const c = static_cast<ClassType*>( nullptr );
> return reinterpret_cast<ptrdiff_t>( &(c->*p) );
> }
>
> I could take a Pointer to...
2012 Oct 02
0
[LLVMdev] Offset to C++ structure members
...orks just fine:
>
> struct A { int ai; };
> struct X : virtual A { int xi; };
> struct Y : virtual A { int yi; };
>
> struct S : X, Y {
> string a;
> string b;
> };
>
> template<class ClassType,class MbrType> inline
> ptrdiff_t mbr_offset_of( MbrType ClassType::*p ) {
> ClassType const *const c = static_cast<ClassType*>( nullptr );
> return reinterpret_cast<ptrdiff_t>( &(c->*p) );
> }
>
> int main() {
>...
2012 Oct 02
1
[LLVMdev] Offset to C++ structure members
...struct A { int ai; };
>> struct X : virtual A { int xi; };
>> struct Y : virtual A { int yi; };
>>
>> struct S : X, Y {
>> string a;
>> string b;
>> };
>>
>> template<class ClassType,class MbrType> inline
>> ptrdiff_t mbr_offset_of( MbrType ClassType::*p ) {
>> ClassType const *const c = static_cast<ClassType*>( nullptr );
>> return reinterpret_cast<ptrdiff_t>( &(c->*p) );
>> }
>>
>>...
2019 Aug 12
1
ALTREP package interaction with testthat
...LTREP package.
The package name is AltWrapper. My ALTREP serialize function is called even
when I'm trying to serialize a non-ALTREP object. Here is an example
```
context("altrep")
length_func<-function(x){
return(length(x))
}
setAltClass(className = "test", classType = "real")
setAltMethod(className = "test", getLength = length_func)
testData = runif(10)
myAltrep = makeAltrep("test", testData)
test_that("Auto serialize", {
browser()
A = 10
A_serialized=serialize(A,NULL)
B = new.env()
B_seria...
2019 Jul 18
0
ALTREP wrappers and factors
...nd has a correct reference
number. The simplest example would be
*CODE*
```
library(AltWrapper)
inspectFunc <- function(x) cat("Altrep object\n")
lengthFunc <- function(x) return(length(x))
getPtrFunc <- function(x, writeable) return(x)
setAltClass(className = "test", classType = "real")
setAltMethod(className = "test", inspect = inspectFunc)
setAltMethod(className = "test", getLength = lengthFunc)
setAltMethod(className = "test", getDataptr = getPtrFunc)
A = runif(6)
A_alt = makeAltrep(className = "test", x = A, *attribu...
2011 Mar 25
1
[LLVMdev] Named metadata to represent language specific logic
Hi all,
I was wondering if we could use named metadata to store some of C++
logic without changing the IR. This is primarily only for front-end
buiding and the resulting IR (with or without metadata) should be the
same as it is today (or better).
I say this because of the number of global variables front-ends need
to keep because LLVM IR cannot represent all the information of types,
vatriables,
2019 Jul 17
2
ALTREP wrappers and factors
Hello,
I?m experimenting with ALTREP and was wondering if there is a preferred way to create an ALTREP wrapper vector without using .Internal(wrap_meta(?)), which R CMD check doesn?t like since it uses an .Internal() function.
I was trying to create a factor that used an ALTREP integer, but attempting to set the class and levels attributes always ended up duplicating and materializing the