File: test_jitify.cpp

package info (click to toggle)
suitesparse-graphblas 7.4.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 67,112 kB
  • sloc: ansic: 1,072,243; cpp: 8,081; sh: 512; makefile: 506; asm: 369; python: 125; awk: 10
file content (38 lines) | stat: -rw-r--r-- 1,097 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "jitify.hpp"
#include "../GB_jit_launcher.h"

int main(int argc, char **argv) {

    std::string named_program = "GB_jit_AxB_phase2";
    std::string kern_name = "AxB_phase2";


    jitify::experimental::Program& program = *std::get<1>(named_program);
    auto instantiated_kernel = program.kernel(kern_name).instantiate({});

    // hashable name is program name
    // string to be jitted is the actual prgram
    //

    dim3 grid(1);
    dim3 block(1);

//      std::cout<< kernel_name<<" with types " <<GET_TYPE_NAME(dumC)<<std::endl;

    std::string hashable_name = "GB_jit_AxB_phase2";
    std::stringstream string_to_be_jitted ;
    string_to_be_jitted << hashable_name << std::endl << R"(#include "GB_jit_AxB_dot3_phase2.cuh")";

    jit::launcher( hashable_name,
                   string_to_be_jitted.str(),
                   header_names,
                   compiler_flags,
                   file_callback)
            .set_kernel_inst( kernel_name, {})
            .configure(grid, block)
            .launch( nanobuckets, blockBucket, bucketp, bucket, C->mat, cnz);




}