Ejemplo n.º 1
0
//bitset1.sparselogicaland(notbitset,andbitset);
static JSVAL bs_sparselogicaland(JSARGS args) {
    HandleScope scope;
    EWAHBoolArray<LENGTH>* bs = (EWAHBoolArray<LENGTH>*) External::Unwrap(args[0]);
    if (!bs) {
        return v8::ThrowException(v8::String::New("In sparselogicaland bitset 1 is Null"));
    }
    EWAHBoolArray<LENGTH>* bs2 = (EWAHBoolArray<LENGTH>*) External::Unwrap(args[1]);
    if (!bs2) {
        return v8::ThrowException(v8::String::New("In sparselogicaland bitset 2 is Null"));
    }
    EWAHBoolArray<LENGTH>* bs3 = (EWAHBoolArray<LENGTH>*) External::Unwrap(args[2]);
    if (!bs3) {
        return v8::ThrowException(v8::String::New("In sparselogicaland bitset 3 is Null"));
    }
    
    bs->sparselogicaland(*bs2, *bs3);
    
    return scope.Close(Null());
}