mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-24 05:47:35 -04:00
merge
This commit is contained in:
commit
4bdab8903e
86 changed files with 14791 additions and 2100072 deletions
4
hw/rtl/cache/VX_cache.v
vendored
4
hw/rtl/cache/VX_cache.v
vendored
|
@ -44,7 +44,7 @@ module VX_cache #(
|
|||
parameter SNOOP_FORWARDING = 0,
|
||||
|
||||
// Prefetcher
|
||||
parameter PRFQ_SIZE = 0,
|
||||
parameter PRFQ_SIZE = 1,
|
||||
parameter PRFQ_STRIDE = 0,
|
||||
|
||||
// core request tag size
|
||||
|
@ -490,4 +490,4 @@ module VX_cache #(
|
|||
.snp_rsp_ready (snp_rsp_ready)
|
||||
);
|
||||
|
||||
endmodule
|
||||
endmodule
|
||||
|
|
4
hw/rtl/cache/VX_cache_dram_req_arb.v
vendored
4
hw/rtl/cache/VX_cache_dram_req_arb.v
vendored
|
@ -10,7 +10,7 @@ module VX_cache_dram_req_arb #(
|
|||
// Dram Fill Req Queue Size
|
||||
parameter DFQQ_SIZE = 0,
|
||||
// Prefetcher
|
||||
parameter PRFQ_SIZE = 0,
|
||||
parameter PRFQ_SIZE = 1,
|
||||
parameter PRFQ_STRIDE = 0
|
||||
) (
|
||||
input wire clk,
|
||||
|
@ -117,4 +117,4 @@ module VX_cache_dram_req_arb #(
|
|||
assign dram_req_addr = dwb_valid ? per_bank_dram_wb_req_addr[dwb_bank] : (dfqq_req ? dfqq_req_addr : pref_addr);
|
||||
assign {dram_req_data} = dwb_valid ? per_bank_dram_wb_req_data[dwb_bank] : 0;
|
||||
|
||||
endmodule
|
||||
endmodule
|
||||
|
|
4
hw/rtl/cache/VX_prefetcher.v
vendored
4
hw/rtl/cache/VX_prefetcher.v
vendored
|
@ -5,7 +5,7 @@ module VX_prefetcher #(
|
|||
parameter BANK_LINE_SIZE = 0,
|
||||
// Size of a word in bytes
|
||||
parameter WORD_SIZE = 0,
|
||||
parameter PRFQ_SIZE = 0,
|
||||
parameter PRFQ_SIZE = 1,
|
||||
parameter PRFQ_STRIDE = 0
|
||||
) (
|
||||
input wire clk,
|
||||
|
@ -68,4 +68,4 @@ module VX_prefetcher #(
|
|||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
endmodule
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
`include "VX_define.vh"
|
||||
|
||||
module VX_generic_queue #(
|
||||
parameter DATAW = 1,
|
||||
parameter SIZE = 16,
|
||||
parameter DATAW = 0,
|
||||
parameter SIZE = 1,
|
||||
parameter BUFFERED_OUTPUT = 1
|
||||
) (
|
||||
input wire clk,
|
||||
|
@ -164,4 +164,4 @@ module VX_generic_queue #(
|
|||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
endmodule
|
||||
|
|
|
@ -91,4 +91,4 @@ run-mt: build-mt
|
|||
(cd obj_dir && ./VVortex)
|
||||
|
||||
clean:
|
||||
rm -rf obj_dir
|
||||
rm -rf obj_dir
|
||||
|
|
|
@ -3,106 +3,100 @@
|
|||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#define ALL_TESTS
|
||||
#ifdef ALL_TESTS
|
||||
bool passed = true;
|
||||
if(argc == 1) {
|
||||
bool passed = true;
|
||||
|
||||
std::string tests[] = {
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-add.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-addi.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-and.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-andi.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-auipc.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-beq.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-bge.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-bgeu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-blt.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-bltu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-bne.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-jal.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-jalr.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lb.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lbu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lh.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lhu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lui.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lw.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-or.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-ori.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sb.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sh.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-simple.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sll.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-slli.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-slt.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-slti.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sltiu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sltu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sra.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-srai.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-srl.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-srli.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sub.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sw.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-xor.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-xori.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-div.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-divu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-mul.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-mulh.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-mulhsu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-mulhu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-rem.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-remu.hex"
|
||||
};
|
||||
std::string tests[] = {
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-add.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-addi.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-and.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-andi.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-auipc.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-beq.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-bge.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-bgeu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-blt.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-bltu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-bne.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-jal.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-jalr.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lb.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lbu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lh.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lhu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lui.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-lw.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-or.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-ori.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sb.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sh.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-simple.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sll.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-slli.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-slt.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-slti.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sltiu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sltu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sra.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-srai.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-srl.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-srli.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sub.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-sw.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-xor.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32ui-p-xori.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-div.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-divu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-mul.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-mulh.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-mulhsu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-mulhu.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-rem.hex",
|
||||
"../../../benchmarks/riscv_tests/rv32um-p-remu.hex"
|
||||
};
|
||||
|
||||
for (std::string test : tests) {
|
||||
std::cerr << DEFAULT << "\n---------------------------------------\n";
|
||||
for (std::string test : tests) {
|
||||
std::cerr << DEFAULT << "\n---------------------------------------\n";
|
||||
|
||||
std::cerr << test << std::endl;
|
||||
std::cerr << test << std::endl;
|
||||
|
||||
RAM ram;
|
||||
Simulator simulator;
|
||||
simulator.attach_ram(&ram);
|
||||
simulator.load_ihex(test.c_str());
|
||||
bool status = simulator.run();
|
||||
RAM ram;
|
||||
Simulator simulator;
|
||||
simulator.attach_ram(&ram);
|
||||
simulator.load_ihex(test.c_str());
|
||||
bool curr = simulator.run();
|
||||
|
||||
if (status) std::cerr << GREEN << "Test Passed: " << test << std::endl;
|
||||
if (!status) std::cerr << RED << "Test Failed: " << test << std::endl;
|
||||
std::cerr << DEFAULT;
|
||||
passed = passed && status;
|
||||
if (!passed)
|
||||
break;
|
||||
if (curr) std::cerr << GREEN << "Test Passed: " << test << std::endl;
|
||||
if (!curr) std::cerr << RED << "Test Failed: " << test << std::endl;
|
||||
std::cerr << DEFAULT;
|
||||
passed = passed && curr;
|
||||
}
|
||||
|
||||
std::cerr << DEFAULT << "\n***************************************\n";
|
||||
|
||||
if (passed) std::cerr << DEFAULT << "PASSED ALL TESTS\n";
|
||||
if (!passed) std::cerr << DEFAULT << "Failed one or more tests\n";
|
||||
|
||||
return !passed;
|
||||
}
|
||||
|
||||
std::cerr << DEFAULT << "\n***************************************\n";
|
||||
else {
|
||||
char* test = argv[2];
|
||||
|
||||
std::cerr << test << std::endl;
|
||||
|
||||
if (passed) std::cerr << DEFAULT << "PASSED ALL TESTS\n";
|
||||
if (!passed) std::cerr << DEFAULT << "Failed one or more tests\n";
|
||||
RAM ram;
|
||||
Simulator simulator;
|
||||
simulator.attach_ram(&ram);
|
||||
simulator.load_ihex(test);
|
||||
bool curr = simulator.run();
|
||||
|
||||
return !passed;
|
||||
if (curr) std::cerr << GREEN << "Test Passed: " << test << std::endl;
|
||||
if (!curr) std::cerr << RED << "Test Failed: " << test << std::endl;
|
||||
|
||||
#else
|
||||
return !curr;
|
||||
}
|
||||
|
||||
char test[] = "../../../runtime/tests/simple/vx_simple.hex";
|
||||
//char test[] = "../../../benchmarks/riscv_tests/rv32ui-p-lb.hex";
|
||||
//char test[] = "../../../benchmarks/riscv_tests/rv32ui-p-lw.hex";
|
||||
//char test[] = "../../../benchmarks/riscv_tests/rv32ui-p-sw.hex";
|
||||
|
||||
std::cerr << test << std::endl;
|
||||
|
||||
RAM ram;
|
||||
Simulator simulator;
|
||||
simulator.attach_ram(&ram);
|
||||
simulator.load_ihex(test);
|
||||
bool status = simulator.run();
|
||||
|
||||
if (status) std::cerr << GREEN << "Test Passed: " << test << std::endl;
|
||||
if (!status) std::cerr << RED << "Test Failed: " << test << std::endl;
|
||||
|
||||
return !status;
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
BIN
hw/unit_tests/cache/.Makefile.swp
vendored
Normal file
BIN
hw/unit_tests/cache/.Makefile.swp
vendored
Normal file
Binary file not shown.
43
hw/unit_tests/cache/Makefile
vendored
Normal file
43
hw/unit_tests/cache/Makefile
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
PARAM += -DCACHE_SIZE=4096 -DWORD_SIZE=4 -DBANK_LINE_SIZE=16 -DNUM_BANKS=4 -DCREQ_SIZE=4 -DMRVQ_SIZE=16 -DDFPQ_SIZE=16 -DSNRQ_SIZE=16 -DCWBQ_SIZE=4 -DDWBQ_SIZE=4 -DFQQ_SIZE=4
|
||||
|
||||
|
||||
|
||||
# control RTL debug print states
|
||||
DBG_PRINT_FLAGS = -DDBG_PRINT_CORE_ICACHE \
|
||||
-DDBG_PRINT_CORE_DCACHE \
|
||||
-DDBG_PRINT_CACHE_BANK \
|
||||
-DDBG_PRINT_CACHE_SNP \
|
||||
-DDBG_PRINT_CACHE_MSRQ \
|
||||
-DDBG_PRINT_DRAM \
|
||||
-DDBG_PRINT_OPAE
|
||||
|
||||
#DBG_PRINT=$(DBG_PRINT_FLAGS)
|
||||
|
||||
INCLUDE = -I../../rtl/ -I../../rtl/cache -I../../rtl/libs
|
||||
|
||||
|
||||
SRCS = cachesim.cpp testbench.cpp
|
||||
|
||||
all: build
|
||||
|
||||
CF += -std=c++11 -fms-extensions -I../..
|
||||
|
||||
VF += --language 1800-2009 --assert -Wall --trace #-Wpedantic
|
||||
VF += -Wno-DECLFILENAME
|
||||
VF += --x-initial unique
|
||||
VF += -exe $(SRCS) $(INCLUDE)
|
||||
|
||||
DBG += -DVCD_OUTPUT $(DBG_PRINT)
|
||||
|
||||
|
||||
gen:
|
||||
verilator $(VF) -DNDEBUG -cc VX_cache.v $(PARAM) -CFLAGS '$(CF) -DNDEBUG $(PARAM)' --exe $(SRCS)
|
||||
|
||||
build: gen
|
||||
(cd obj_dir && make -j -f VVX_cache.mk)
|
||||
|
||||
run: build
|
||||
(cd obj_dir && ./VVX_cache)
|
||||
|
||||
clean:
|
||||
rm -rf obj_dir
|
284
hw/unit_tests/cache/cachesim.cpp
vendored
Normal file
284
hw/unit_tests/cache/cachesim.cpp
vendored
Normal file
|
@ -0,0 +1,284 @@
|
|||
#include "cachesim.h"
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
uint64_t timestamp = 0;
|
||||
|
||||
double sc_time_stamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
CacheSim::CacheSim() {
|
||||
// force random values for uninitialized signals
|
||||
Verilated::randReset(2);
|
||||
|
||||
ram_ = nullptr;
|
||||
cache_ = new VVX_cache();
|
||||
|
||||
dram_rsp_active_ = false;
|
||||
snp_req_active_ = false;
|
||||
|
||||
//#ifdef VCD_OUTPUT
|
||||
Verilated::traceEverOn(true);
|
||||
trace_ = new VerilatedVcdC;
|
||||
cache_->trace(trace_, 99);
|
||||
trace_->open("trace.vcd");
|
||||
//#endif
|
||||
}
|
||||
|
||||
CacheSim::~CacheSim() {
|
||||
//#ifdef VCD_OUTPUT
|
||||
trace_->close();
|
||||
//#endif
|
||||
delete cache_;
|
||||
//need to delete the req and rsp vectors
|
||||
}
|
||||
|
||||
void CacheSim::attach_ram(RAM* ram) {
|
||||
ram_ = ram;
|
||||
dram_rsp_vec_.clear();
|
||||
}
|
||||
|
||||
void CacheSim::reset() {
|
||||
#ifndef NDEBUG
|
||||
std::cout << timestamp << ": [sim] reset()" << std::endl;
|
||||
#endif
|
||||
|
||||
cache_->reset = 1;
|
||||
this->step();
|
||||
cache_->reset = 0;
|
||||
this->step();
|
||||
|
||||
dram_rsp_vec_.clear();
|
||||
//clear req and rsp vecs
|
||||
|
||||
}
|
||||
|
||||
void CacheSim::step() {
|
||||
//toggle clock
|
||||
cache_->clk = 0;
|
||||
this->eval();
|
||||
|
||||
cache_->clk = 1;
|
||||
this->eval();
|
||||
|
||||
//handle core and dram reqs and rsps
|
||||
this->eval_reqs();
|
||||
this->eval_rsps();
|
||||
this->eval_dram_bus();
|
||||
}
|
||||
|
||||
void CacheSim::eval() {
|
||||
cache_->eval();
|
||||
//#ifdef VCD_OUTPUT
|
||||
trace_->dump(timestamp);
|
||||
//#endif
|
||||
++timestamp;
|
||||
}
|
||||
|
||||
void CacheSim::run(){
|
||||
#ifndef NDEBUG
|
||||
std::cout << timestamp << ": [sim] run()" << std::endl;
|
||||
#endif
|
||||
this->step();
|
||||
|
||||
int valid = 300;
|
||||
|
||||
while (valid > -1) {
|
||||
this->step();
|
||||
if(!cache_->core_req_valid && !cache_->core_rsp_valid){
|
||||
valid--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CacheSim::clear_req(){
|
||||
cache_->core_req_valid = 0;
|
||||
}
|
||||
|
||||
|
||||
void CacheSim::send_req(core_req_t *req){
|
||||
core_req_vec_.push(req);
|
||||
unsigned int *data = new unsigned int[4];
|
||||
core_rsp_vec_.insert(std::pair<unsigned int, unsigned int*>(req->tag, data));
|
||||
}
|
||||
|
||||
bool CacheSim::get_core_req_ready(){
|
||||
return cache_->core_req_ready;
|
||||
}
|
||||
|
||||
bool CacheSim::get_core_rsp_ready(){
|
||||
return cache_->core_rsp_ready;
|
||||
}
|
||||
|
||||
void CacheSim::eval_reqs(){
|
||||
//check to see if cache is accepting reqs
|
||||
if(!core_req_vec_.empty() && cache_->core_req_ready){
|
||||
core_req_t *req = core_req_vec_.front();
|
||||
|
||||
cache_->core_req_valid = req->valid;
|
||||
cache_->core_req_rw = req->rw;
|
||||
cache_->core_req_byteen = req->byteen;
|
||||
|
||||
cache_->core_req_addr[0] = req->addr[0];
|
||||
cache_->core_req_addr[1] = req->addr[1];
|
||||
cache_->core_req_addr[2] = req->addr[2];
|
||||
cache_->core_req_addr[3] = req->addr[3];
|
||||
|
||||
cache_->core_req_data[0] = req->data[0];
|
||||
cache_->core_req_data[1] = req->data[1];
|
||||
cache_->core_req_data[2] = req->data[2];
|
||||
cache_->core_req_data[3] = req->data[3];
|
||||
|
||||
cache_->core_req_tag = req->tag;
|
||||
|
||||
core_req_vec_.pop();
|
||||
|
||||
} else {
|
||||
clear_req();
|
||||
}
|
||||
}
|
||||
|
||||
void CacheSim::eval_rsps(){
|
||||
//check to see if a request has been responded to
|
||||
if (cache_->core_rsp_valid){
|
||||
core_rsp_vec_.at(cache_->core_rsp_tag)[0] = cache_->core_rsp_data[0];
|
||||
core_rsp_vec_.at(cache_->core_rsp_tag)[1] = cache_->core_rsp_data[1];
|
||||
core_rsp_vec_.at(cache_->core_rsp_tag)[2] = cache_->core_rsp_data[2];
|
||||
core_rsp_vec_.at(cache_->core_rsp_tag)[3] = cache_->core_rsp_data[3];
|
||||
}
|
||||
}
|
||||
|
||||
void CacheSim::eval_dram_bus() {
|
||||
if (ram_ == nullptr) {
|
||||
cache_->dram_req_ready = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// schedule DRAM responses
|
||||
int dequeue_index = -1;
|
||||
for (int i = 0; i < dram_rsp_vec_.size(); i++) {
|
||||
if (dram_rsp_vec_[i].cycles_left > 0) {
|
||||
dram_rsp_vec_[i].cycles_left -= 1;
|
||||
}
|
||||
if ((dequeue_index == -1)
|
||||
&& (dram_rsp_vec_[i].cycles_left == 0)) {
|
||||
dequeue_index = i;
|
||||
}
|
||||
}
|
||||
|
||||
// send DRAM response
|
||||
if (dram_rsp_active_
|
||||
&& cache_->dram_rsp_valid
|
||||
&& cache_->dram_rsp_ready) {
|
||||
dram_rsp_active_ = false;
|
||||
}
|
||||
if (!dram_rsp_active_) {
|
||||
if (dequeue_index != -1) { //time to respond to the request
|
||||
cache_->dram_rsp_valid = 1;
|
||||
|
||||
//copy data from the rsp queue to the cache module
|
||||
memcpy((uint8_t*)cache_->dram_rsp_data, dram_rsp_vec_[dequeue_index].data, GLOBAL_BLOCK_SIZE);
|
||||
|
||||
cache_->dram_rsp_tag = dram_rsp_vec_[dequeue_index].tag;
|
||||
free(dram_rsp_vec_[dequeue_index].data); //take data out of the queue
|
||||
dram_rsp_vec_.erase(dram_rsp_vec_.begin() + dequeue_index);
|
||||
dram_rsp_active_ = true;
|
||||
} else {
|
||||
cache_->dram_rsp_valid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// handle DRAM stalls
|
||||
bool dram_stalled = false;
|
||||
#ifdef ENABLE_DRAM_STALLS
|
||||
if (0 == ((timestamp/2) % DRAM_STALLS_MODULO)) {
|
||||
dram_stalled = true;
|
||||
} else
|
||||
if (dram_rsp_vec_.size() >= DRAM_RQ_SIZE) {
|
||||
dram_stalled = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// process DRAM requests
|
||||
if (!dram_stalled) {
|
||||
if (cache_->dram_req_valid) {
|
||||
if (cache_->dram_req_rw) { //write = 1
|
||||
uint64_t byteen = cache_->dram_req_byteen;
|
||||
unsigned base_addr = (cache_->dram_req_addr * GLOBAL_BLOCK_SIZE);
|
||||
uint8_t* data = (uint8_t*)(cache_->dram_req_data);
|
||||
for (int i = 0; i < GLOBAL_BLOCK_SIZE; i++) {
|
||||
if ((byteen >> i) & 0x1) {
|
||||
(*ram_)[base_addr + i] = data[i];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dram_req_t dram_req;
|
||||
dram_req.cycles_left = DRAM_LATENCY;
|
||||
dram_req.data = (uint8_t*)malloc(GLOBAL_BLOCK_SIZE);
|
||||
dram_req.tag = cache_->dram_req_tag;
|
||||
ram_->read(cache_->dram_req_addr * GLOBAL_BLOCK_SIZE, GLOBAL_BLOCK_SIZE, dram_req.data);
|
||||
dram_rsp_vec_.push_back(dram_req);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cache_->dram_req_ready = ~dram_stalled;
|
||||
}
|
||||
|
||||
bool CacheSim::assert_equal(unsigned int* data, unsigned int tag){
|
||||
int check = 0;
|
||||
unsigned int *rsp = core_rsp_vec_.at(tag);
|
||||
for (int i = 0; i < 4; ++i){
|
||||
for (int j = 0; j < 4; ++j){
|
||||
if (data[i] == rsp[j]){
|
||||
check++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return check;
|
||||
|
||||
}
|
||||
|
||||
//DEBUG
|
||||
|
||||
void CacheSim::get_core_rsp(unsigned int (&rsp)[4]){
|
||||
rsp[0] = cache_->core_rsp_data[0];
|
||||
rsp[1] = cache_->core_rsp_data[1];
|
||||
rsp[2] = cache_->core_rsp_data[2];
|
||||
rsp[3] = cache_->core_rsp_data[3];
|
||||
//std::cout << std::hex << "core_rsp_valid: " << cache_->core_rsp_valid << std::endl;
|
||||
//std::cout << std::hex << "core_rsp_data: " << cache_->core_rsp_data << std::endl;
|
||||
//std::cout << std::hex << "core_rsp_tag: " << cache_->core_rsp_tag << std::endl;
|
||||
}
|
||||
|
||||
void CacheSim::get_core_req(){
|
||||
char check = cache_->core_req_valid;
|
||||
std::cout << std::hex << "core_req_valid: " << check << std::endl;
|
||||
std::cout << std::hex << "core_req_data[0]: " << cache_->core_req_data[0] << std::endl;
|
||||
std::cout << std::hex << "core_req_data[1]: " << cache_->core_req_data[1] << std::endl;
|
||||
std::cout << std::hex << "core_req_data[2]: " << cache_->core_req_data[2] << std::endl;
|
||||
std::cout << std::hex << "core_req_data[3]: " << cache_->core_req_data[3] << std::endl;
|
||||
std::cout << std::hex << "core_req_tag: " << cache_->core_req_tag << std::endl;
|
||||
}
|
||||
|
||||
void CacheSim::get_dram_req(){
|
||||
std::cout << std::hex << "dram_req_valid: " << cache_->dram_req_valid << std::endl;
|
||||
std::cout << std::hex << "dram_req_rw: " << cache_->dram_req_rw << std::endl;
|
||||
std::cout << std::hex << "dram_req_byteen: " << cache_->dram_req_byteen << std::endl;
|
||||
std::cout << std::hex << "dram_req_addr: " << cache_->dram_req_addr << std::endl;
|
||||
std::cout << std::hex << "dram_req_data: " << cache_->dram_req_data << std::endl;
|
||||
std::cout << std::hex << "dram_req_tag: " << cache_->dram_req_tag << std::endl;
|
||||
}
|
||||
|
||||
void CacheSim::get_dram_rsp(){
|
||||
std::cout << std::hex << "dram_rsp_valid: " << cache_->dram_rsp_valid << std::endl;
|
||||
std::cout << std::hex << "dram_rsp_data: " << cache_->dram_rsp_data << std::endl;
|
||||
std::cout << std::hex << "dram_rsp_tag: " << cache_->dram_rsp_tag << std::endl;
|
||||
std::cout << std::hex << "dram_rsp_ready: " << cache_->dram_rsp_ready << std::endl;
|
||||
}
|
||||
|
88
hw/unit_tests/cache/cachesim.h
vendored
Normal file
88
hw/unit_tests/cache/cachesim.h
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
#pragma once
|
||||
|
||||
#include "VVX_cache.h"
|
||||
#include "VVX_cache__Syms.h"
|
||||
#include "verilated.h"
|
||||
|
||||
//#ifdef VCD_OUTPUT
|
||||
#include <verilated_vcd_c.h>
|
||||
//#endif
|
||||
|
||||
//#include <VX_config.h>
|
||||
#include "ram.h"
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
|
||||
#define ENABLE_DRAM_STALLS
|
||||
#define DRAM_LATENCY 100
|
||||
#define DRAM_RQ_SIZE 16
|
||||
#define DRAM_STALLS_MODULO 16
|
||||
#define GLOBAL_BLOCK_SIZE 16
|
||||
|
||||
typedef struct {
|
||||
int cycles_left;
|
||||
uint8_t *data;
|
||||
unsigned tag;
|
||||
} dram_req_t;
|
||||
|
||||
typedef struct {
|
||||
char valid;
|
||||
char rw;
|
||||
unsigned byteen;
|
||||
unsigned *addr;
|
||||
unsigned *data;
|
||||
unsigned int tag;
|
||||
} core_req_t;
|
||||
|
||||
class CacheSim {
|
||||
public:
|
||||
|
||||
CacheSim();
|
||||
virtual ~CacheSim();
|
||||
|
||||
bool busy();
|
||||
|
||||
void reset();
|
||||
void step();
|
||||
void wait(uint32_t cycles);
|
||||
void attach_ram(RAM* ram);
|
||||
|
||||
void run(); //run until all reqs are empty
|
||||
void clear_req();
|
||||
void send_req(core_req_t *req);
|
||||
bool assert_equal(unsigned int* data, unsigned int tag);
|
||||
|
||||
//display funcs
|
||||
|
||||
void get_dram_req();
|
||||
void get_core_rsp(unsigned int (&rsp)[4]);
|
||||
void get_core_req();
|
||||
bool get_core_req_ready();
|
||||
bool get_core_rsp_ready();
|
||||
void get_dram_rsp();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void eval();
|
||||
|
||||
void eval_reqs();
|
||||
void eval_rsps();
|
||||
void eval_dram_bus();
|
||||
|
||||
std::queue<core_req_t*> core_req_vec_;
|
||||
std::vector<dram_req_t> dram_rsp_vec_;
|
||||
std::map<unsigned int, unsigned int*> core_rsp_vec_;
|
||||
int dram_rsp_active_;
|
||||
|
||||
uint32_t snp_req_active_;
|
||||
uint32_t snp_req_size_;
|
||||
uint32_t pending_snp_reqs_;
|
||||
|
||||
VVX_cache *cache_;
|
||||
RAM *ram_;
|
||||
//#ifdef VCD_OUTPUT
|
||||
VerilatedVcdC *trace_;
|
||||
//#endif
|
||||
};
|
64
hw/unit_tests/cache/ram.h
vendored
Normal file
64
hw/unit_tests/cache/ram.h
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
class RAM {
|
||||
private:
|
||||
|
||||
mutable uint8_t *mem_[(1 << 12)];
|
||||
|
||||
uint8_t *get(uint32_t address) const {
|
||||
uint32_t block_addr = address >> 20;
|
||||
uint32_t block_offset = address & 0x000FFFFF;
|
||||
if (mem_[block_addr] == NULL) {
|
||||
mem_[block_addr] = new uint8_t[(1 << 20)];
|
||||
}
|
||||
return mem_[block_addr] + block_offset;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
RAM() {
|
||||
for (uint32_t i = 0; i < (1 << 12); i++) {
|
||||
mem_[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
~RAM() {
|
||||
this->clear();
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return (1ull << 32);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
for (uint32_t i = 0; i < (1 << 12); i++) {
|
||||
if (mem_[i]) {
|
||||
delete mem_[i];
|
||||
mem_[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void read(uint32_t address, uint32_t length, uint8_t *data) const {
|
||||
for (unsigned i = 0; i < length; i++) {
|
||||
data[i] = *this->get(address + i);
|
||||
}
|
||||
}
|
||||
|
||||
void write(uint32_t address, uint32_t length, const uint8_t *data) {
|
||||
for (unsigned i = 0; i < length; i++) {
|
||||
*this->get(address + i) = data[i];
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t& operator[](uint32_t address) {
|
||||
return *get(address);
|
||||
}
|
||||
|
||||
const uint8_t& operator[](uint32_t address) const {
|
||||
return *get(address);
|
||||
}
|
||||
};
|
54
hw/unit_tests/cache/testbench.cpp
vendored
Normal file
54
hw/unit_tests/cache/testbench.cpp
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
#include "cachesim.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
#define VCD_OUTPUT 1
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
//init
|
||||
RAM ram;
|
||||
CacheSim cachesim;
|
||||
cachesim.attach_ram(&ram);
|
||||
|
||||
unsigned int addr[4] = {0x12222222, 0xabbbbbbb, 0xcddddddd, 0xe4444444};
|
||||
unsigned int data[4] = {0xffffffff, 0x11111111, 0x22222222, 0x33333333};
|
||||
unsigned int rsp[4] = {0,0,0,0};
|
||||
char responded = 0;
|
||||
//write req
|
||||
core_req_t* write = new core_req_t;
|
||||
write->valid = 0xf;
|
||||
write->rw = 0xf;
|
||||
write->byteen = 0xffff;
|
||||
write->addr = addr;
|
||||
write->data = data;
|
||||
write->tag = 0xff;
|
||||
|
||||
//read req
|
||||
core_req_t* read = new core_req_t;
|
||||
read->valid = 0xf;
|
||||
read->rw = 0;
|
||||
read->byteen = 0xffff;
|
||||
read->addr = addr;
|
||||
read->data = addr;
|
||||
read->tag = 0xff;
|
||||
|
||||
// reset the device
|
||||
cachesim.reset();
|
||||
|
||||
//queue reqs
|
||||
cachesim.send_req(write);
|
||||
cachesim.send_req(read);
|
||||
|
||||
cachesim.run();
|
||||
|
||||
bool check = cachesim.assert_equal(data, write->tag);
|
||||
if(check){
|
||||
std::cout << "PASSED" << std::endl;
|
||||
} else {
|
||||
std::cout << "FAILED" << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
13998
hw/unit_tests/cache/trace.vcd
vendored
Normal file
13998
hw/unit_tests/cache/trace.vcd
vendored
Normal file
File diff suppressed because it is too large
Load diff
34
miscs/rvvector/vector_test/Makefile
Normal file
34
miscs/rvvector/vector_test/Makefile
Normal file
|
@ -0,0 +1,34 @@
|
|||
RISCV_TOOLCHAIN_PATH ?= ~/dev/riscv-gnu-toolchain/drops
|
||||
VORTEX_RT_PATH ?= $(wildcard ../..)
|
||||
|
||||
CC = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
AR = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc-ar
|
||||
DP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
CFLAGS += -march=rv32im -mabi=ilp32 -O3 -Wl,-Bstatic,-T,$(VORTEX_RT_PATH)/linker/vx_link.ld
|
||||
CFLAGS += -nostartfiles -ffreestanding -fno-exceptions -Wl,--gc-sections
|
||||
CFLAGS += -I$(VORTEX_RT_PATH)/include
|
||||
|
||||
LDFLAGS += $(VORTEX_RT_PATH)/libvortexrt.a
|
||||
|
||||
PROJECT = vx_vector_main
|
||||
|
||||
SRCS = vx_vector_main.c vx_vec.s
|
||||
|
||||
all: $(PROJECT).elf $(PROJECT).hex $(PROJECT).dump
|
||||
|
||||
$(PROJECT).dump: $(PROJECT).elf
|
||||
$(DP) -D $(PROJECT).elf > $(PROJECT).dump
|
||||
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
$(CP) -O ihex $(PROJECT).elf $(PROJECT).hex
|
||||
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
clean:
|
||||
rm -rf *.elf *.hex *.dump .depend
|
|
@ -1,4 +1,4 @@
|
|||
#include "../../intrinsics/vx_intrinsics.h"
|
||||
#include <vx_intrinsics.h>
|
||||
#include "vx_vec.h"
|
||||
|
||||
int main()
|
||||
|
@ -22,4 +22,4 @@ int main()
|
|||
vx_print_hex(c[i]);
|
||||
|
||||
vx_tmc(0);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,21 @@
|
|||
all:
|
||||
$(MAKE) -C simple
|
||||
$(MAKE) -C dev
|
||||
$(MAKE) -C hello
|
||||
$(MAKE) -C nlTest
|
||||
$(MAKE) -C vecadd
|
||||
|
||||
run:
|
||||
cd simple && $(MAKE) run
|
||||
cd dev && $(MAKE) run
|
||||
cd hello && $(MAKE) run
|
||||
cd nlTest && $(MAKE) run
|
||||
cd vecadd && $(MAKE) run
|
||||
|
||||
clean:
|
||||
$(MAKE) -C simple clean
|
||||
$(MAKE) -C simple clean
|
||||
$(MAKE) -C dev clean
|
||||
$(MAKE) -C hello clean
|
||||
$(MAKE) -C nlTest clean
|
||||
$(MAKE) -C vecadd clean
|
||||
|
||||
|
|
|
@ -1,32 +1,37 @@
|
|||
RISCV_TOOLCHAIN_PATH ?= ~/dev/riscv-gnu-toolchain/drops
|
||||
VORTEX_RT_PATH ?= $(wildcard ../..)
|
||||
|
||||
RISCV_TOOLCHAIN_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||
CC = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
AR = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc-ar
|
||||
DP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
COMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../../startup/vx_link.ld -ffreestanding -nostartfiles
|
||||
CFLAGS += -march=rv32im -mabi=ilp32 -O3 -Wl,-Bstatic,-T,$(VORTEX_RT_PATH)/linker/vx_link.ld
|
||||
CFLAGS += -nostartfiles -ffreestanding -fno-exceptions -Wl,--gc-sections
|
||||
CFLAGS += -I$(VORTEX_RT_PATH)/include
|
||||
|
||||
DMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CPY = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
LDFLAGS += $(VORTEX_RT_PATH)/libvortexrt.a
|
||||
|
||||
PROJECT = vx_dev_main
|
||||
|
||||
VX_STR = ../../startup/vx_start.S
|
||||
VX_INT = ../../intrinsics/vx_intrinsics.S
|
||||
VX_IO = ../../io/vx_io.S ../../io/vx_io.c
|
||||
VX_API = ../../vx_api/vx_api.c
|
||||
VX_TEST = ../common/tests.c
|
||||
SRCS = vx_dev_main.c
|
||||
|
||||
VX_MAIN = ./vx_dev_main.c
|
||||
all: $(PROJECT).elf $(PROJECT).hex $(PROJECT).dump
|
||||
|
||||
all: HEX DUMP ELF
|
||||
$(PROJECT).dump: $(PROJECT).elf
|
||||
$(DP) -D $(PROJECT).elf > $(PROJECT).dump
|
||||
|
||||
DUMP: ELF
|
||||
$(DMP) -D vx_dev_main.elf > vx_dev_main.dump
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
$(CP) -O ihex $(PROJECT).elf $(PROJECT).hex
|
||||
|
||||
HEX: ELF
|
||||
$(CPY) -O ihex vx_dev_main.elf vx_dev_main.hex
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
ELF:
|
||||
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST) $(VX_MAIN) -o vx_dev_main.elf
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/dev/$(PROJECT).hex)
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.elf *.dump *.hex *.qemu *.log *.debug
|
||||
rm -rf *.elf *.hex *.dump .depend
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
#include "../../intrinsics/vx_intrinsics.h"
|
||||
#include "../../io/vx_io.h"
|
||||
#include "../common/tests.h"
|
||||
#include "../../vx_api/vx_api.h"
|
||||
#include <vx_intrinsics.h>
|
||||
|
||||
|
||||
// #include <utlist.h>
|
||||
|
|
|
@ -1,31 +1,37 @@
|
|||
RISCV_TOOLCHAIN_PATH ?= ~/dev/riscv-gnu-toolchain/drops
|
||||
VORTEX_RT_PATH ?= $(wildcard ../..)
|
||||
|
||||
RISCV_TOOLCHAIN_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||
CC = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
AR = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc-ar
|
||||
DP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
COMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../../startup/vx_link.ld
|
||||
CFLAGS += -march=rv32im -mabi=ilp32 -O3 -Wl,-Bstatic,-T,$(VORTEX_RT_PATH)/linker/vx_link.ld
|
||||
CFLAGS += -nostartfiles -ffreestanding -fno-exceptions -Wl,--gc-sections
|
||||
CFLAGS += -I$(VORTEX_RT_PATH)/include
|
||||
|
||||
DMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CPY = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
LDFLAGS += $(VORTEX_RT_PATH)/libvortexrt.a
|
||||
|
||||
PROJECT = hello
|
||||
|
||||
NEWLIB = ../../newlib/newlib.c
|
||||
VX_STR =
|
||||
VX_INT = ../../intrinsics/vx_intrinsics.S
|
||||
VX_IO =
|
||||
VX_API =
|
||||
VX_FIO =
|
||||
LIBS = $(RISCV_TOOLCHAIN_PATH)/riscv32-unknown-elf/lib/libc.a $(RISCV_TOOLCHAIN_PATH)/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||
SRCS = hello.cpp
|
||||
|
||||
VX_MAIN = hello
|
||||
all: $(PROJECT).elf $(PROJECT).hex $(PROJECT).dump
|
||||
|
||||
all: HEX DUMP ELF
|
||||
$(PROJECT).dump: $(PROJECT).elf
|
||||
$(DP) -D $(PROJECT).elf > $(PROJECT).dump
|
||||
|
||||
DUMP: ELF
|
||||
$(DMP) -D $(VX_MAIN).elf > $(VX_MAIN).dump
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
$(CP) -O ihex $(PROJECT).elf $(PROJECT).hex
|
||||
|
||||
HEX: ELF
|
||||
$(CPY) -O ihex $(VX_MAIN).elf $(VX_MAIN).hex
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
ELF:
|
||||
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_MAIN).cpp $(LIBS) -Iinclude -o $(VX_MAIN).elf
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/hello/$(PROJECT).hex)
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
clean:
|
||||
rm -rf *.elf *.hex *.dump .depend
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
|
||||
RISCV_TOOLCHAIN_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||
|
||||
COMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-g++
|
||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostartfiles
|
||||
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,../../startup/vx_link.ld -march=rv32im -mabi=ilp32
|
||||
|
||||
DMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CPY = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
# VX_STR = ../../startup/vx_start.S
|
||||
|
||||
|
||||
|
||||
NEWLIB = ../../newlib/newlib.c
|
||||
VX_STR = ../../startup/vx_start.S
|
||||
VX_INT = ../../intrinsics/vx_intrinsics.S
|
||||
VX_IO = ../../io/vx_io.S ../../io/vx_io.c
|
||||
VX_API = ../../vx_api/vx_api.c
|
||||
VX_FIO = ../../fileio/fileio.S
|
||||
LIBS = -Wl,--whole-archive ./libs/libvecadd.a -Wl,--no-whole-archive ./libs/libOpenCL.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libc.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||
|
||||
VX_MAIN = vx_pocl_main
|
||||
|
||||
all: HEX DUMP ELF
|
||||
|
||||
DUMP: ELF
|
||||
$(DMP) -D $(VX_MAIN).elf > $(VX_MAIN).dump
|
||||
|
||||
HEX: ELF
|
||||
$(CPY) -O ihex $(VX_MAIN).elf $(VX_MAIN).hex
|
||||
|
||||
ELF:
|
||||
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_MAIN).c $(LIBS) -Iinclude -o $(VX_MAIN).elf
|
|
@ -1,46 +0,0 @@
|
|||
#=============================================================================
|
||||
# CMake build system files
|
||||
#
|
||||
# Copyright (c) 2014 pocl developers
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
#cl.hpp: $(top_srcdir)/include/CL/cl.hpp.in $(top_srcdir)/tools/patches/khronos_cl.hpp.patch
|
||||
|
||||
if(INSTALL_OPENCL_HEADERS)
|
||||
install(FILES cl.h
|
||||
cl.hpp
|
||||
cl2.hpp
|
||||
cl_d3d10.h
|
||||
cl_d3d11.h
|
||||
cl_dx9_media_sharing.h
|
||||
cl_dx9_media_sharing_intel.h
|
||||
cl_ext.h
|
||||
cl_egl.h
|
||||
cl_ext_intel.h
|
||||
cl_gl.h
|
||||
cl_gl_ext.h
|
||||
cl_platform.h
|
||||
cl_va_api_media_sharing_intel.h
|
||||
cl_version.h
|
||||
opencl.h
|
||||
DESTINATION "${POCL_INSTALL_OPENCL_HEADER_DIR}")
|
||||
endif()
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,131 +0,0 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_D3D10_H
|
||||
#define __OPENCL_CL_D3D10_H
|
||||
|
||||
#include <d3d10.h>
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* cl_khr_d3d10_sharing */
|
||||
#define cl_khr_d3d10_sharing 1
|
||||
|
||||
typedef cl_uint cl_d3d10_device_source_khr;
|
||||
typedef cl_uint cl_d3d10_device_set_khr;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_D3D10_DEVICE_KHR -1002
|
||||
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
|
||||
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
|
||||
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
|
||||
|
||||
/* cl_d3d10_device_source_nv */
|
||||
#define CL_D3D10_DEVICE_KHR 0x4010
|
||||
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
|
||||
|
||||
/* cl_d3d10_device_set_nv */
|
||||
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
|
||||
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
|
||||
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
|
||||
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_d3d10_device_source_khr d3d_device_source,
|
||||
void * d3d_object,
|
||||
cl_d3d10_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Buffer * resource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture2D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture3D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_D3D10_H */
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_D3D11_H
|
||||
#define __OPENCL_CL_D3D11_H
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* cl_khr_d3d11_sharing */
|
||||
#define cl_khr_d3d11_sharing 1
|
||||
|
||||
typedef cl_uint cl_d3d11_device_source_khr;
|
||||
typedef cl_uint cl_d3d11_device_set_khr;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_D3D11_DEVICE_KHR -1006
|
||||
#define CL_INVALID_D3D11_RESOURCE_KHR -1007
|
||||
#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008
|
||||
#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009
|
||||
|
||||
/* cl_d3d11_device_source */
|
||||
#define CL_D3D11_DEVICE_KHR 0x4019
|
||||
#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A
|
||||
|
||||
/* cl_d3d11_device_set */
|
||||
#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B
|
||||
#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D
|
||||
#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_D3D11_RESOURCE_KHR 0x401E
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020
|
||||
#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_d3d11_device_source_khr d3d_device_source,
|
||||
void * d3d_object,
|
||||
cl_d3d11_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Buffer * resource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture2D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture3D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_D3D11_H */
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||
#define __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
/* cl_khr_dx9_media_sharing */
|
||||
#define cl_khr_dx9_media_sharing 1
|
||||
|
||||
typedef cl_uint cl_dx9_media_adapter_type_khr;
|
||||
typedef cl_uint cl_dx9_media_adapter_set_khr;
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <d3d9.h>
|
||||
typedef struct _cl_dx9_surface_info_khr
|
||||
{
|
||||
IDirect3DSurface9 *resource;
|
||||
HANDLE shared_handle;
|
||||
} cl_dx9_surface_info_khr;
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
|
||||
#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
|
||||
#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
|
||||
#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
|
||||
|
||||
/* cl_media_adapter_type_khr */
|
||||
#define CL_ADAPTER_D3D9_KHR 0x2020
|
||||
#define CL_ADAPTER_D3D9EX_KHR 0x2021
|
||||
#define CL_ADAPTER_DXVA_KHR 0x2022
|
||||
|
||||
/* cl_media_adapter_set_khr */
|
||||
#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
|
||||
#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
|
||||
#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
|
||||
#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
|
||||
#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
|
||||
#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_uint num_media_adapters,
|
||||
cl_dx9_media_adapter_type_khr * media_adapter_type,
|
||||
void * media_adapters,
|
||||
cl_dx9_media_adapter_set_khr media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_dx9_media_adapter_type_khr adapter_type,
|
||||
void * surface_info,
|
||||
cl_uint plane,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */
|
||||
|
|
@ -1,182 +0,0 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_dx9_media_sharing_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
|
||||
#define __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#include <d3d9.h>
|
||||
#include <dxvahd.h>
|
||||
#include <wtypes.h>
|
||||
#include <d3d9types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************
|
||||
* cl_intel_dx9_media_sharing extension *
|
||||
****************************************/
|
||||
|
||||
#define cl_intel_dx9_media_sharing 1
|
||||
|
||||
typedef cl_uint cl_dx9_device_source_intel;
|
||||
typedef cl_uint cl_dx9_device_set_intel;
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_DX9_DEVICE_INTEL -1010
|
||||
#define CL_INVALID_DX9_RESOURCE_INTEL -1011
|
||||
#define CL_DX9_RESOURCE_ALREADY_ACQUIRED_INTEL -1012
|
||||
#define CL_DX9_RESOURCE_NOT_ACQUIRED_INTEL -1013
|
||||
|
||||
/* cl_dx9_device_source_intel */
|
||||
#define CL_D3D9_DEVICE_INTEL 0x4022
|
||||
#define CL_D3D9EX_DEVICE_INTEL 0x4070
|
||||
#define CL_DXVA_DEVICE_INTEL 0x4071
|
||||
|
||||
/* cl_dx9_device_set_intel */
|
||||
#define CL_PREFERRED_DEVICES_FOR_DX9_INTEL 0x4024
|
||||
#define CL_ALL_DEVICES_FOR_DX9_INTEL 0x4025
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D9_DEVICE_INTEL 0x4026
|
||||
#define CL_CONTEXT_D3D9EX_DEVICE_INTEL 0x4072
|
||||
#define CL_CONTEXT_DXVA_DEVICE_INTEL 0x4073
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_DX9_RESOURCE_INTEL 0x4027
|
||||
#define CL_MEM_DX9_SHARED_HANDLE_INTEL 0x4074
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_DX9_PLANE_INTEL 0x4075
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_DX9_OBJECTS_INTEL 0x402A
|
||||
#define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B
|
||||
/******************************************************************************/
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromDX9INTEL(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromDX9MediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H */
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_EGL_H
|
||||
#define __OPENCL_CL_EGL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
|
||||
#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F
|
||||
#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D
|
||||
#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E
|
||||
|
||||
/* Error type for clCreateFromEGLImageKHR */
|
||||
#define CL_INVALID_EGL_OBJECT_KHR -1093
|
||||
#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
|
||||
|
||||
/* CLeglImageKHR is an opaque handle to an EGLImage */
|
||||
typedef void* CLeglImageKHR;
|
||||
|
||||
/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
|
||||
typedef void* CLeglDisplayKHR;
|
||||
|
||||
/* CLeglSyncKHR is an opaque handle to an EGLSync object */
|
||||
typedef void* CLeglSyncKHR;
|
||||
|
||||
/* properties passed to clCreateFromEGLImageKHR */
|
||||
typedef intptr_t cl_egl_image_properties_khr;
|
||||
|
||||
|
||||
#define cl_khr_egl_image 1
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromEGLImageKHR(cl_context context,
|
||||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr * properties,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
|
||||
cl_context context,
|
||||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr * properties,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
#define cl_khr_egl_event 1
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateEventFromEGLSyncKHR(cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
|
||||
cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_EGL_H */
|
|
@ -1,762 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* cl_ext.h contains OpenCL extensions which don't have external */
|
||||
/* (OpenGL, D3D) dependencies. */
|
||||
|
||||
#ifndef __CL_EXT_H
|
||||
#define __CL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
/* cl_khr_fp64 extension - no extension #define since it has no functions */
|
||||
/* CL_DEVICE_DOUBLE_FP_CONFIG is defined in CL.h for OpenCL >= 120 */
|
||||
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110
|
||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||
#endif
|
||||
|
||||
/* cl_khr_fp16 extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
|
||||
|
||||
/* Memory object destruction
|
||||
*
|
||||
* Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
|
||||
*
|
||||
* Registers a user callback function that will be called when the memory object is deleted and its resources
|
||||
* freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback
|
||||
* stack associated with memobj. The registered user callback functions are called in the reverse order in
|
||||
* which they were registered. The user callback functions are called and then the memory object is deleted
|
||||
* and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be
|
||||
* notified when the memory referenced by host_ptr, specified when the memory object is created and used as
|
||||
* the storage bits for the memory object, can be reused or freed.
|
||||
*
|
||||
* The application may not call CL api's with the cl_mem object passed to the pfn_notify.
|
||||
*
|
||||
* Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*/
|
||||
#define cl_APPLE_SetMemObjectDestructor 1
|
||||
cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem memobj,
|
||||
void (* pfn_notify)(cl_mem memobj, void * user_data),
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/* Context Logging Functions
|
||||
*
|
||||
* The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
|
||||
* Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*
|
||||
* clLogMessagesToSystemLog forwards on all log messages to the Apple System Logger
|
||||
*/
|
||||
#define cl_APPLE_ContextLoggingFunctions 1
|
||||
extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
|
||||
extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
|
||||
extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/************************
|
||||
* cl_khr_icd extension *
|
||||
************************/
|
||||
#define cl_khr_icd 1
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_PLATFORM_NOT_FOUND_KHR -1001
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clIcdGetPlatformIDsKHR(cl_uint num_entries,
|
||||
cl_platform_id * platforms,
|
||||
cl_uint * num_platforms);
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(cl_uint num_entries,
|
||||
cl_platform_id * platforms,
|
||||
cl_uint * num_platforms);
|
||||
|
||||
|
||||
/*******************************
|
||||
* cl_khr_il_program extension *
|
||||
*******************************/
|
||||
#define cl_khr_il_program 1
|
||||
|
||||
/* New property to clGetDeviceInfo for retrieving supported intermediate
|
||||
* languages
|
||||
*/
|
||||
#define CL_DEVICE_IL_VERSION_KHR 0x105B
|
||||
|
||||
/* New property to clGetProgramInfo for retrieving for retrieving the IL of a
|
||||
* program
|
||||
*/
|
||||
#define CL_PROGRAM_IL_KHR 0x1169
|
||||
|
||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||
clCreateProgramWithILKHR(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
typedef CL_API_ENTRY cl_program
|
||||
(CL_API_CALL *clCreateProgramWithILKHR_fn)(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/* Extension: cl_khr_image2d_from_buffer
|
||||
*
|
||||
* This extension allows a 2D image to be created from a cl_mem buffer without
|
||||
* a copy. The type associated with a 2D image created from a buffer in an
|
||||
* OpenCL program is image2d_t. Both the sampler and sampler-less read_image
|
||||
* built-in functions are supported for 2D images and 2D images created from
|
||||
* a buffer. Similarly, the write_image built-ins are also supported for 2D
|
||||
* images created from a buffer.
|
||||
*
|
||||
* When the 2D image from buffer is created, the client must specify the
|
||||
* width, height, image format (i.e. channel order and channel data type)
|
||||
* and optionally the row pitch.
|
||||
*
|
||||
* The pitch specified must be a multiple of
|
||||
* CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR pixels.
|
||||
* The base address of the buffer must be aligned to
|
||||
* CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR pixels.
|
||||
*/
|
||||
|
||||
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR 0x104A
|
||||
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR 0x104B
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_initialize_memory extension *
|
||||
**************************************/
|
||||
|
||||
#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x2030
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_terminate_context extension *
|
||||
**************************************/
|
||||
|
||||
#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x2031
|
||||
#define CL_CONTEXT_TERMINATE_KHR 0x2032
|
||||
|
||||
#define cl_khr_terminate_context 1
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clTerminateContextKHR(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clTerminateContextKHR_fn)(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/*
|
||||
* Extension: cl_khr_spir
|
||||
*
|
||||
* This extension adds support to create an OpenCL program object from a
|
||||
* Standard Portable Intermediate Representation (SPIR) instance
|
||||
*/
|
||||
|
||||
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
|
||||
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
||||
|
||||
|
||||
/*****************************************
|
||||
* cl_khr_create_command_queue extension *
|
||||
*****************************************/
|
||||
#define cl_khr_create_command_queue 1
|
||||
|
||||
typedef cl_bitfield cl_queue_properties_khr;
|
||||
|
||||
extern CL_API_ENTRY cl_command_queue CL_API_CALL
|
||||
clCreateCommandQueueWithPropertiesKHR(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_command_queue
|
||||
(CL_API_CALL *clCreateCommandQueueWithPropertiesKHR_fn)(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_nv_device_attribute_query extension *
|
||||
******************************************/
|
||||
|
||||
/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
|
||||
#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
|
||||
#define CL_DEVICE_WARP_SIZE_NV 0x4003
|
||||
#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
|
||||
#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
|
||||
#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_amd_device_attribute_query *
|
||||
*********************************/
|
||||
|
||||
#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_arm_printf extension
|
||||
*********************************/
|
||||
|
||||
#define CL_PRINTF_CALLBACK_ARM 0x40B0
|
||||
#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
|
||||
|
||||
|
||||
/***********************************
|
||||
* cl_ext_device_fission extension
|
||||
***********************************/
|
||||
#define cl_ext_device_fission 1
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clReleaseDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clRetainDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef cl_ulong cl_device_partition_property_ext;
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clCreateSubDevicesEXT(cl_device_id in_device,
|
||||
const cl_device_partition_property_ext * properties,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * out_devices,
|
||||
cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL * clCreateSubDevicesEXT_fn)(cl_device_id in_device,
|
||||
const cl_device_partition_property_ext * properties,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * out_devices,
|
||||
cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
/* cl_device_partition_property_ext */
|
||||
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
|
||||
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
||||
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
||||
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
||||
|
||||
/* clDeviceGetInfo selectors */
|
||||
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
||||
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
||||
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
||||
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
||||
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
||||
|
||||
/* error codes */
|
||||
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
||||
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
||||
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
||||
|
||||
/* CL_AFFINITY_DOMAINs */
|
||||
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
||||
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
||||
#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
|
||||
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
||||
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
||||
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
||||
|
||||
/* cl_device_partition_property_ext list terminators */
|
||||
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
|
||||
|
||||
|
||||
/***********************************
|
||||
* cl_ext_migrate_memobject extension definitions
|
||||
***********************************/
|
||||
#define cl_ext_migrate_memobject 1
|
||||
|
||||
typedef cl_bitfield cl_mem_migration_flags_ext;
|
||||
|
||||
#define CL_MIGRATE_MEM_OBJECT_HOST_EXT 0x1
|
||||
|
||||
#define CL_COMMAND_MIGRATE_MEM_OBJECT_EXT 0x4040
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueMigrateMemObjectEXT(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clEnqueueMigrateMemObjectEXT_fn)(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_ext_host_ptr extension
|
||||
*********************************/
|
||||
#define cl_qcom_ext_host_ptr 1
|
||||
|
||||
#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
|
||||
|
||||
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
|
||||
#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
|
||||
#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
|
||||
#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
|
||||
#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
|
||||
#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
|
||||
#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
|
||||
#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
|
||||
|
||||
typedef cl_uint cl_image_pitch_info_qcom;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceImageInfoQCOM(cl_device_id device,
|
||||
size_t image_width,
|
||||
size_t image_height,
|
||||
const cl_image_format *image_format,
|
||||
cl_image_pitch_info_qcom param_name,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
|
||||
typedef struct _cl_mem_ext_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Legal values will be defined in layered extensions. */
|
||||
cl_uint allocation_type;
|
||||
|
||||
/* Host cache policy for this external memory allocation. */
|
||||
cl_uint host_cache_policy;
|
||||
|
||||
} cl_mem_ext_host_ptr;
|
||||
|
||||
|
||||
/*******************************************
|
||||
* cl_qcom_ext_host_ptr_iocoherent extension
|
||||
********************************************/
|
||||
|
||||
/* Cache policy specifying io-coherence */
|
||||
#define CL_MEM_HOST_IOCOHERENT_QCOM 0x40A9
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_ion_host_ptr extension
|
||||
*********************************/
|
||||
|
||||
#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
|
||||
|
||||
typedef struct _cl_mem_ion_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
|
||||
cl_mem_ext_host_ptr ext_host_ptr;
|
||||
|
||||
/* ION file descriptor */
|
||||
int ion_filedesc;
|
||||
|
||||
/* Host pointer to the ION allocated memory */
|
||||
void* ion_hostptr;
|
||||
|
||||
} cl_mem_ion_host_ptr;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_android_native_buffer_host_ptr extension
|
||||
*********************************/
|
||||
|
||||
#define CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM 0x40C6
|
||||
|
||||
typedef struct _cl_mem_android_native_buffer_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Must be CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM for Android native buffers. */
|
||||
cl_mem_ext_host_ptr ext_host_ptr;
|
||||
|
||||
/* Virtual pointer to the android native buffer */
|
||||
void* anb_ptr;
|
||||
|
||||
} cl_mem_android_native_buffer_host_ptr;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_yuv_image extension *
|
||||
******************************************/
|
||||
|
||||
/* Image formats used in clCreateImage */
|
||||
#define CL_NV21_IMG 0x40D0
|
||||
#define CL_YV12_IMG 0x40D1
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_cached_allocations extension *
|
||||
******************************************/
|
||||
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
|
||||
#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_use_gralloc_ptr extension *
|
||||
******************************************/
|
||||
#define cl_img_use_gralloc_ptr 1
|
||||
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||
|
||||
/* To be used by clGetEventInfo: */
|
||||
#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
|
||||
#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3
|
||||
|
||||
/* Error code from clEnqueueReleaseGrallocObjectsIMG */
|
||||
#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGrallocObjectsIMG(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGrallocObjectsIMG(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_subgroups extension
|
||||
*********************************/
|
||||
#define cl_khr_subgroups 1
|
||||
|
||||
#if !defined(CL_VERSION_2_1)
|
||||
/* For OpenCL 2.1 and newer, cl_kernel_sub_group_info is declared in CL.h.
|
||||
In hindsight, there should have been a khr suffix on this type for
|
||||
the extension, but keeping it un-suffixed to maintain backwards
|
||||
compatibility. */
|
||||
typedef cl_uint cl_kernel_sub_group_info;
|
||||
#endif
|
||||
|
||||
/* cl_kernel_sub_group_info */
|
||||
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
|
||||
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetKernelSubGroupInfoKHR(cl_kernel in_kernel,
|
||||
cl_device_id in_device,
|
||||
cl_kernel_sub_group_info param_name,
|
||||
size_t input_value_size,
|
||||
const void * input_value,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel in_kernel,
|
||||
cl_device_id in_device,
|
||||
cl_kernel_sub_group_info param_name,
|
||||
size_t input_value_size,
|
||||
const void * input_value,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_mipmap_image extension
|
||||
*********************************/
|
||||
|
||||
/* cl_sampler_properties */
|
||||
#define CL_SAMPLER_MIP_FILTER_MODE_KHR 0x1155
|
||||
#define CL_SAMPLER_LOD_MIN_KHR 0x1156
|
||||
#define CL_SAMPLER_LOD_MAX_KHR 0x1157
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_priority_hints extension
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_priority_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_priority_khr;
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_PRIORITY_KHR 0x1096
|
||||
|
||||
/* cl_queue_priority_khr */
|
||||
#define CL_QUEUE_PRIORITY_HIGH_KHR (1<<0)
|
||||
#define CL_QUEUE_PRIORITY_MED_KHR (1<<1)
|
||||
#define CL_QUEUE_PRIORITY_LOW_KHR (1<<2)
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_throttle_hints extension
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_throttle_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_throttle_khr;
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_THROTTLE_KHR 0x1097
|
||||
|
||||
/* cl_queue_throttle_khr */
|
||||
#define CL_QUEUE_THROTTLE_HIGH_KHR (1<<0)
|
||||
#define CL_QUEUE_THROTTLE_MED_KHR (1<<1)
|
||||
#define CL_QUEUE_THROTTLE_LOW_KHR (1<<2)
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_subgroup_named_barrier
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_subgroup_named_barrier 1
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035
|
||||
|
||||
|
||||
/**********************************
|
||||
* cl_arm_import_memory extension *
|
||||
**********************************/
|
||||
#define cl_arm_import_memory 1
|
||||
|
||||
typedef intptr_t cl_import_properties_arm;
|
||||
|
||||
/* Default and valid proporties name for cl_arm_import_memory */
|
||||
#define CL_IMPORT_TYPE_ARM 0x40B2
|
||||
|
||||
/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_HOST_ARM 0x40B3
|
||||
|
||||
/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4
|
||||
|
||||
/* Protected DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_PROTECTED_ARM 0x40B5
|
||||
|
||||
/* This extension adds a new function that allows for direct memory import into
|
||||
* OpenCL via the clImportMemoryARM function.
|
||||
*
|
||||
* Memory imported through this interface will be mapped into the device's page
|
||||
* tables directly, providing zero copy access. It will never fall back to copy
|
||||
* operations and aliased buffers.
|
||||
*
|
||||
* Types of memory supported for import are specified as additional extension
|
||||
* strings.
|
||||
*
|
||||
* This extension produces cl_mem allocations which are compatible with all other
|
||||
* users of cl_mem in the standard API.
|
||||
*
|
||||
* This extension maps pages with the same properties as the normal buffer creation
|
||||
* function clCreateBuffer.
|
||||
*/
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clImportMemoryARM( cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_import_properties_arm *properties,
|
||||
void *memory,
|
||||
size_t size,
|
||||
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_arm_shared_virtual_memory extension *
|
||||
******************************************/
|
||||
#define cl_arm_shared_virtual_memory 1
|
||||
|
||||
/* Used by clGetDeviceInfo */
|
||||
#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
|
||||
|
||||
/* Used by clGetMemObjectInfo */
|
||||
#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7
|
||||
|
||||
/* Used by clSetKernelExecInfoARM: */
|
||||
#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8
|
||||
#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9
|
||||
|
||||
/* To be used by clGetEventInfo: */
|
||||
#define CL_COMMAND_SVM_FREE_ARM 0x40BA
|
||||
#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB
|
||||
#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC
|
||||
#define CL_COMMAND_SVM_MAP_ARM 0x40BD
|
||||
#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE
|
||||
|
||||
/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */
|
||||
#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0)
|
||||
#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1)
|
||||
#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2)
|
||||
#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3)
|
||||
|
||||
/* Flag values used by clSVMAllocARM: */
|
||||
#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10)
|
||||
#define CL_MEM_SVM_ATOMICS_ARM (1 << 11)
|
||||
|
||||
typedef cl_bitfield cl_svm_mem_flags_arm;
|
||||
typedef cl_uint cl_kernel_exec_info_arm;
|
||||
typedef cl_bitfield cl_device_svm_capabilities_arm;
|
||||
|
||||
extern CL_API_ENTRY void * CL_API_CALL
|
||||
clSVMAllocARM(cl_context context,
|
||||
cl_svm_mem_flags_arm flags,
|
||||
size_t size,
|
||||
cl_uint alignment) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY void CL_API_CALL
|
||||
clSVMFreeARM(cl_context context,
|
||||
void * svm_pointer) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMFreeARM(cl_command_queue command_queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void * svm_pointers[],
|
||||
void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void * svm_pointers[],
|
||||
void * user_data),
|
||||
void * user_data,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMemcpyARM(cl_command_queue command_queue,
|
||||
cl_bool blocking_copy,
|
||||
void * dst_ptr,
|
||||
const void * src_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMemFillARM(cl_command_queue command_queue,
|
||||
void * svm_ptr,
|
||||
const void * pattern,
|
||||
size_t pattern_size,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMapARM(cl_command_queue command_queue,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags flags,
|
||||
void * svm_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMUnmapARM(cl_command_queue command_queue,
|
||||
void * svm_ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetKernelArgSVMPointerARM(cl_kernel kernel,
|
||||
cl_uint arg_index,
|
||||
const void * arg_value) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetKernelExecInfoARM(cl_kernel kernel,
|
||||
cl_kernel_exec_info_arm param_name,
|
||||
size_t param_value_size,
|
||||
const void * param_value) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/********************************
|
||||
* cl_arm_get_core_id extension *
|
||||
********************************/
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
#define cl_arm_get_core_id 1
|
||||
|
||||
/* Device info property for bitfield of cores present */
|
||||
#define CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM 0x40BF
|
||||
|
||||
#endif /* CL_VERSION_1_2 */
|
||||
|
||||
/*********************************
|
||||
* cl_arm_job_slot_selection
|
||||
*********************************/
|
||||
|
||||
#define cl_arm_job_slot_selection 1
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_JOB_SLOTS_ARM 0x41E0
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_JOB_SLOT_ARM 0x41E1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __CL_EXT_H */
|
|
@ -1,423 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_ext_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __CL_EXT_INTEL_H
|
||||
#define __CL_EXT_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************
|
||||
* cl_intel_thread_local_exec extension *
|
||||
****************************************/
|
||||
|
||||
#define cl_intel_thread_local_exec 1
|
||||
|
||||
#define CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL (((cl_bitfield)1) << 31)
|
||||
|
||||
/***********************************************
|
||||
* cl_intel_device_partition_by_names extension *
|
||||
************************************************/
|
||||
|
||||
#define cl_intel_device_partition_by_names 1
|
||||
|
||||
#define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052
|
||||
#define CL_PARTITION_BY_NAMES_LIST_END_INTEL -1
|
||||
|
||||
/************************************************
|
||||
* cl_intel_accelerator extension *
|
||||
* cl_intel_motion_estimation extension *
|
||||
* cl_intel_advanced_motion_estimation extension *
|
||||
*************************************************/
|
||||
|
||||
#define cl_intel_accelerator 1
|
||||
#define cl_intel_motion_estimation 1
|
||||
#define cl_intel_advanced_motion_estimation 1
|
||||
|
||||
typedef struct _cl_accelerator_intel* cl_accelerator_intel;
|
||||
typedef cl_uint cl_accelerator_type_intel;
|
||||
typedef cl_uint cl_accelerator_info_intel;
|
||||
|
||||
typedef struct _cl_motion_estimation_desc_intel {
|
||||
cl_uint mb_block_type;
|
||||
cl_uint subpixel_mode;
|
||||
cl_uint sad_adjust_mode;
|
||||
cl_uint search_path_type;
|
||||
} cl_motion_estimation_desc_intel;
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_ACCELERATOR_INTEL -1094
|
||||
#define CL_INVALID_ACCELERATOR_TYPE_INTEL -1095
|
||||
#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL -1096
|
||||
#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL -1097
|
||||
|
||||
/* cl_accelerator_type_intel */
|
||||
#define CL_ACCELERATOR_TYPE_MOTION_ESTIMATION_INTEL 0x0
|
||||
|
||||
/* cl_accelerator_info_intel */
|
||||
#define CL_ACCELERATOR_DESCRIPTOR_INTEL 0x4090
|
||||
#define CL_ACCELERATOR_REFERENCE_COUNT_INTEL 0x4091
|
||||
#define CL_ACCELERATOR_CONTEXT_INTEL 0x4092
|
||||
#define CL_ACCELERATOR_TYPE_INTEL 0x4093
|
||||
|
||||
/* cl_motion_detect_desc_intel flags */
|
||||
#define CL_ME_MB_TYPE_16x16_INTEL 0x0
|
||||
#define CL_ME_MB_TYPE_8x8_INTEL 0x1
|
||||
#define CL_ME_MB_TYPE_4x4_INTEL 0x2
|
||||
|
||||
#define CL_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
|
||||
#define CL_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
|
||||
#define CL_ME_SUBPIXEL_MODE_QPEL_INTEL 0x2
|
||||
|
||||
#define CL_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
|
||||
#define CL_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x1
|
||||
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_2_2_INTEL 0x0
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_4_4_INTEL 0x1
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_16_12_INTEL 0x5
|
||||
|
||||
#define CL_ME_SKIP_BLOCK_TYPE_16x16_INTEL 0x0
|
||||
#define CL_ME_CHROMA_INTRA_PREDICT_ENABLED_INTEL 0x1
|
||||
#define CL_ME_LUMA_INTRA_PREDICT_ENABLED_INTEL 0x2
|
||||
#define CL_ME_SKIP_BLOCK_TYPE_8x8_INTEL 0x4
|
||||
|
||||
#define CL_ME_FORWARD_INPUT_MODE_INTEL 0x1
|
||||
#define CL_ME_BACKWARD_INPUT_MODE_INTEL 0x2
|
||||
#define CL_ME_BIDIRECTION_INPUT_MODE_INTEL 0x3
|
||||
|
||||
#define CL_ME_BIDIR_WEIGHT_QUARTER_INTEL 16
|
||||
#define CL_ME_BIDIR_WEIGHT_THIRD_INTEL 21
|
||||
#define CL_ME_BIDIR_WEIGHT_HALF_INTEL 32
|
||||
#define CL_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 43
|
||||
#define CL_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 48
|
||||
|
||||
#define CL_ME_COST_PENALTY_NONE_INTEL 0x0
|
||||
#define CL_ME_COST_PENALTY_LOW_INTEL 0x1
|
||||
#define CL_ME_COST_PENALTY_NORMAL_INTEL 0x2
|
||||
#define CL_ME_COST_PENALTY_HIGH_INTEL 0x3
|
||||
|
||||
#define CL_ME_COST_PRECISION_QPEL_INTEL 0x0
|
||||
#define CL_ME_COST_PRECISION_HPEL_INTEL 0x1
|
||||
#define CL_ME_COST_PRECISION_PEL_INTEL 0x2
|
||||
#define CL_ME_COST_PRECISION_DPEL_INTEL 0x3
|
||||
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
|
||||
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
|
||||
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_ME_VERSION_INTEL 0x407E
|
||||
|
||||
#define CL_ME_VERSION_LEGACY_INTEL 0x0
|
||||
#define CL_ME_VERSION_ADVANCED_VER_1_INTEL 0x1
|
||||
#define CL_ME_VERSION_ADVANCED_VER_2_INTEL 0x2
|
||||
|
||||
extern CL_API_ENTRY cl_accelerator_intel CL_API_CALL
|
||||
clCreateAcceleratorINTEL(
|
||||
cl_context context,
|
||||
cl_accelerator_type_intel accelerator_type,
|
||||
size_t descriptor_size,
|
||||
const void* descriptor,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_accelerator_intel (CL_API_CALL *clCreateAcceleratorINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_accelerator_type_intel accelerator_type,
|
||||
size_t descriptor_size,
|
||||
const void* descriptor,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetAcceleratorInfoINTEL(
|
||||
cl_accelerator_intel accelerator,
|
||||
cl_accelerator_info_intel param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
|
||||
cl_accelerator_intel accelerator,
|
||||
cl_accelerator_info_intel param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainAcceleratorINTEL(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainAcceleratorINTEL_fn)(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseAcceleratorINTEL(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/******************************************
|
||||
* cl_intel_simultaneous_sharing extension *
|
||||
*******************************************/
|
||||
|
||||
#define cl_intel_simultaneous_sharing 1
|
||||
|
||||
#define CL_DEVICE_SIMULTANEOUS_INTEROPS_INTEL 0x4104
|
||||
#define CL_DEVICE_NUM_SIMULTANEOUS_INTEROPS_INTEL 0x4105
|
||||
|
||||
/***********************************
|
||||
* cl_intel_egl_image_yuv extension *
|
||||
************************************/
|
||||
|
||||
#define cl_intel_egl_image_yuv 1
|
||||
|
||||
#define CL_EGL_YUV_PLANE_INTEL 0x4107
|
||||
|
||||
/********************************
|
||||
* cl_intel_packed_yuv extension *
|
||||
*********************************/
|
||||
|
||||
#define cl_intel_packed_yuv 1
|
||||
|
||||
#define CL_YUYV_INTEL 0x4076
|
||||
#define CL_UYVY_INTEL 0x4077
|
||||
#define CL_YVYU_INTEL 0x4078
|
||||
#define CL_VYUY_INTEL 0x4079
|
||||
|
||||
/********************************************
|
||||
* cl_intel_required_subgroup_size extension *
|
||||
*********************************************/
|
||||
|
||||
#define cl_intel_required_subgroup_size 1
|
||||
|
||||
#define CL_DEVICE_SUB_GROUP_SIZES_INTEL 0x4108
|
||||
#define CL_KERNEL_SPILL_MEM_SIZE_INTEL 0x4109
|
||||
#define CL_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL 0x410A
|
||||
|
||||
/****************************************
|
||||
* cl_intel_driver_diagnostics extension *
|
||||
*****************************************/
|
||||
|
||||
#define cl_intel_driver_diagnostics 1
|
||||
|
||||
typedef cl_uint cl_diagnostics_verbose_level;
|
||||
|
||||
#define CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL 0x4106
|
||||
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL ( 0xff )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL ( 1 )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL ( 1 << 1 )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL ( 1 << 2 )
|
||||
|
||||
/********************************
|
||||
* cl_intel_planar_yuv extension *
|
||||
*********************************/
|
||||
|
||||
#define CL_NV12_INTEL 0x410E
|
||||
|
||||
#define CL_MEM_NO_ACCESS_INTEL ( 1 << 24 )
|
||||
#define CL_MEM_ACCESS_FLAGS_UNRESTRICTED_INTEL ( 1 << 25 )
|
||||
|
||||
#define CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL 0x417E
|
||||
#define CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL 0x417F
|
||||
|
||||
/*******************************************************
|
||||
* cl_intel_device_side_avc_motion_estimation extension *
|
||||
********************************************************/
|
||||
|
||||
#define CL_DEVICE_AVC_ME_VERSION_INTEL 0x410B
|
||||
#define CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL 0x410C
|
||||
#define CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL 0x410D
|
||||
|
||||
#define CL_AVC_ME_VERSION_0_INTEL 0x0; // No support.
|
||||
#define CL_AVC_ME_VERSION_1_INTEL 0x1; // First supported version.
|
||||
|
||||
#define CL_AVC_ME_MAJOR_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_MAJOR_16x8_INTEL 0x1
|
||||
#define CL_AVC_ME_MAJOR_8x16_INTEL 0x2
|
||||
#define CL_AVC_ME_MAJOR_8x8_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_MINOR_8x8_INTEL 0x0
|
||||
#define CL_AVC_ME_MINOR_8x4_INTEL 0x1
|
||||
#define CL_AVC_ME_MINOR_4x8_INTEL 0x2
|
||||
#define CL_AVC_ME_MINOR_4x4_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_MAJOR_FORWARD_INTEL 0x0
|
||||
#define CL_AVC_ME_MAJOR_BACKWARD_INTEL 0x1
|
||||
#define CL_AVC_ME_MAJOR_BIDIRECTIONAL_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_PARTITION_MASK_ALL_INTEL 0x0
|
||||
#define CL_AVC_ME_PARTITION_MASK_16x16_INTEL 0x7E
|
||||
#define CL_AVC_ME_PARTITION_MASK_16x8_INTEL 0x7D
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x16_INTEL 0x7B
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x8_INTEL 0x77
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x4_INTEL 0x6F
|
||||
#define CL_AVC_ME_PARTITION_MASK_4x8_INTEL 0x5F
|
||||
#define CL_AVC_ME_PARTITION_MASK_4x4_INTEL 0x3F
|
||||
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_EXHAUSTIVE_INTEL 0x0
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_SMALL_INTEL 0x1
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_TINY_INTEL 0x2
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_EXTRA_TINY_INTEL 0x3
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_DIAMOND_INTEL 0x4
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_LARGE_DIAMOND_INTEL 0x5
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_RESERVED0_INTEL 0x6
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_RESERVED1_INTEL 0x7
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_CUSTOM_INTEL 0x8
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_16x12_RADIUS_INTEL 0x9
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_4x4_RADIUS_INTEL 0x2
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_2x2_RADIUS_INTEL 0xa
|
||||
|
||||
#define CL_AVC_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
|
||||
#define CL_AVC_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_QPEL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_COST_PRECISION_QPEL_INTEL 0x0
|
||||
#define CL_AVC_ME_COST_PRECISION_HPEL_INTEL 0x1
|
||||
#define CL_AVC_ME_COST_PRECISION_PEL_INTEL 0x2
|
||||
#define CL_AVC_ME_COST_PRECISION_DPEL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_QUARTER_INTEL 0x10
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_THIRD_INTEL 0x15
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_HALF_INTEL 0x20
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 0x2B
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 0x30
|
||||
|
||||
#define CL_AVC_ME_BORDER_REACHED_LEFT_INTEL 0x0
|
||||
#define CL_AVC_ME_BORDER_REACHED_RIGHT_INTEL 0x2
|
||||
#define CL_AVC_ME_BORDER_REACHED_TOP_INTEL 0x4
|
||||
#define CL_AVC_ME_BORDER_REACHED_BOTTOM_INTEL 0x8
|
||||
|
||||
#define CL_AVC_ME_SKIP_BLOCK_PARTITION_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_SKIP_BLOCK_PARTITION_8x8_INTEL 0x4000
|
||||
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_DUAL_ENABLE_INTEL ( 0x3 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_FORWARD_ENABLE_INTEL ( 0x55 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_BACKWARD_ENABLE_INTEL ( 0xAA << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_DUAL_ENABLE_INTEL ( 0xFF << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_0_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_0_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_1_FORWARD_ENABLE_INTEL ( 0x1 << 26 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_1_BACKWARD_ENABLE_INTEL ( 0x2 << 26 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_2_FORWARD_ENABLE_INTEL ( 0x1 << 28 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_2_BACKWARD_ENABLE_INTEL ( 0x2 << 28 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_3_FORWARD_ENABLE_INTEL ( 0x1 << 30 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_3_BACKWARD_ENABLE_INTEL ( 0x2 << 30 )
|
||||
|
||||
#define CL_AVC_ME_BLOCK_BASED_SKIP_4x4_INTEL 0x00
|
||||
#define CL_AVC_ME_BLOCK_BASED_SKIP_8x8_INTEL 0x80
|
||||
|
||||
#define CL_AVC_ME_INTRA_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_INTRA_8x8_INTEL 0x1
|
||||
#define CL_AVC_ME_INTRA_4x4_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_16x16_INTEL 0x6
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_8x8_INTEL 0x5
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_4x4_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_LEFT_MASK_ENABLE_INTEL 0x60
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_MASK_ENABLE_INTEL 0x10
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_RIGHT_MASK_ENABLE_INTEL 0x8
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_LEFT_MASK_ENABLE_INTEL 0x4
|
||||
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_FRAME_FORWARD_INTEL 0x1
|
||||
#define CL_AVC_ME_FRAME_BACKWARD_INTEL 0x2
|
||||
#define CL_AVC_ME_FRAME_DUAL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_SLICE_TYPE_PRED_INTEL 0x0
|
||||
#define CL_AVC_ME_SLICE_TYPE_BPRED_INTEL 0x1
|
||||
#define CL_AVC_ME_SLICE_TYPE_INTRA_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_INTERLACED_SCAN_TOP_FIELD_INTEL 0x0
|
||||
#define CL_AVC_ME_INTERLACED_SCAN_BOTTOM_FIELD_INTEL 0x1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CL_EXT_INTEL_H */
|
|
@ -1,171 +0,0 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_GL_H
|
||||
#define __OPENCL_CL_GL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef cl_uint cl_gl_object_type;
|
||||
typedef cl_uint cl_gl_texture_info;
|
||||
typedef cl_uint cl_gl_platform_info;
|
||||
typedef struct __GLsync *cl_GLsync;
|
||||
|
||||
/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */
|
||||
#define CL_GL_OBJECT_BUFFER 0x2000
|
||||
#define CL_GL_OBJECT_TEXTURE2D 0x2001
|
||||
#define CL_GL_OBJECT_TEXTURE3D 0x2002
|
||||
#define CL_GL_OBJECT_RENDERBUFFER 0x2003
|
||||
#ifdef CL_VERSION_1_2
|
||||
#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
|
||||
#define CL_GL_OBJECT_TEXTURE1D 0x200F
|
||||
#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
|
||||
#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
|
||||
#endif
|
||||
|
||||
/* cl_gl_texture_info */
|
||||
#define CL_GL_TEXTURE_TARGET 0x2004
|
||||
#define CL_GL_MIPMAP_LEVEL 0x2005
|
||||
#ifdef CL_VERSION_1_2
|
||||
#define CL_GL_NUM_SAMPLES 0x2012
|
||||
#endif
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLBuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint bufobj,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#endif
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLRenderbuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint renderbuffer,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLObjectInfo(cl_mem memobj,
|
||||
cl_gl_object_type * gl_object_type,
|
||||
cl_GLuint * gl_object_name) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLTextureInfo(cl_mem memobj,
|
||||
cl_gl_texture_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGLObjects(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGLObjects(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/* Deprecated OpenCL 1.1 APIs */
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture2D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture3D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
/* cl_khr_gl_sharing extension */
|
||||
|
||||
#define cl_khr_gl_sharing 1
|
||||
|
||||
typedef cl_uint cl_gl_context_info;
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
|
||||
|
||||
/* cl_gl_context_info */
|
||||
#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
|
||||
#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
|
||||
|
||||
/* Additional cl_context_properties */
|
||||
#define CL_GL_CONTEXT_KHR 0x2008
|
||||
#define CL_EGL_DISPLAY_KHR 0x2009
|
||||
#define CL_GLX_DISPLAY_KHR 0x200A
|
||||
#define CL_WGL_HDC_KHR 0x200B
|
||||
#define CL_CGL_SHAREGROUP_KHR 0x200C
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLContextInfoKHR(const cl_context_properties * properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
|
||||
const cl_context_properties * properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_H */
|
|
@ -1,52 +0,0 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_GL_EXT_H
|
||||
#define __OPENCL_CL_GL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl_gl.h>
|
||||
|
||||
/*
|
||||
* cl_khr_gl_event extension
|
||||
*/
|
||||
#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateEventFromGLsyncKHR(cl_context context,
|
||||
cl_GLsync cl_GLsync,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_EXT_H */
|
File diff suppressed because it is too large
Load diff
|
@ -1,172 +0,0 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_va_api_media_sharing_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
#define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#include <va/va.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************
|
||||
* cl_intel_va_api_media_sharing extension *
|
||||
*******************************************/
|
||||
|
||||
#define cl_intel_va_api_media_sharing 1
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098
|
||||
#define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099
|
||||
#define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100
|
||||
#define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101
|
||||
|
||||
/* cl_va_api_device_source_intel */
|
||||
#define CL_VA_API_DISPLAY_INTEL 0x4094
|
||||
|
||||
/* cl_va_api_device_set_intel */
|
||||
#define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095
|
||||
#define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_VA_API_PLANE_INTEL 0x4099
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A
|
||||
#define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B
|
||||
|
||||
typedef cl_uint cl_va_api_device_source_intel;
|
||||
typedef cl_uint cl_va_api_device_set_intel;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromVA_APIMediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H */
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2018 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __CL_VERSION_H
|
||||
#define __CL_VERSION_H
|
||||
|
||||
/* Detect which version to target */
|
||||
#if !defined(CL_TARGET_OPENCL_VERSION)
|
||||
#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION != 100 && \
|
||||
CL_TARGET_OPENCL_VERSION != 110 && \
|
||||
CL_TARGET_OPENCL_VERSION != 120 && \
|
||||
CL_TARGET_OPENCL_VERSION != 200 && \
|
||||
CL_TARGET_OPENCL_VERSION != 210 && \
|
||||
CL_TARGET_OPENCL_VERSION != 220
|
||||
#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220). Defaulting to 220 (OpenCL 2.2)")
|
||||
#undef CL_TARGET_OPENCL_VERSION
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
|
||||
|
||||
/* OpenCL Version */
|
||||
#if CL_TARGET_OPENCL_VERSION >= 220 && !defined(CL_VERSION_2_2)
|
||||
#define CL_VERSION_2_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 210 && !defined(CL_VERSION_2_1)
|
||||
#define CL_VERSION_2_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 200 && !defined(CL_VERSION_2_0)
|
||||
#define CL_VERSION_2_0 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 120 && !defined(CL_VERSION_1_2)
|
||||
#define CL_VERSION_1_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 110 && !defined(CL_VERSION_1_1)
|
||||
#define CL_VERSION_1_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 100 && !defined(CL_VERSION_1_0)
|
||||
#define CL_VERSION_1_0 1
|
||||
#endif
|
||||
|
||||
/* Allow deprecated APIs for older OpenCL versions. */
|
||||
#if CL_TARGET_OPENCL_VERSION <= 210 && !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#endif
|
||||
|
||||
#endif /* __CL_VERSION_H */
|
|
@ -1,47 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_H
|
||||
#define __OPENCL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_gl.h>
|
||||
#include <CL/cl_gl_ext.h>
|
||||
#include <CL/cl_ext.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_H */
|
|
@ -1,35 +0,0 @@
|
|||
#=============================================================================
|
||||
# CMake build system files
|
||||
#
|
||||
# Copyright (c) 2014 pocl developers
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
add_subdirectory("CL")
|
||||
|
||||
set(PRIVATE_HEADERS _enable_all_exts.h _builtin_renames.h
|
||||
_kernel.h _clang_opencl.h
|
||||
_kernel_c.h _kernel_constants.h
|
||||
pocl_types.h pocl_device.h pocl.h pocl_spir.h
|
||||
pocl_image_types.h)
|
||||
|
||||
install(FILES ${PRIVATE_HEADERS}
|
||||
DESTINATION ${POCL_INSTALL_PRIVATE_HEADER_DIR})
|
|
@ -1 +0,0 @@
|
|||
#include "../CL/cl.h"
|
|
@ -1 +0,0 @@
|
|||
#include "../CL/cl.hpp"
|
|
@ -1 +0,0 @@
|
|||
#include "../CL/cl_ext.h"
|
|
@ -1 +0,0 @@
|
|||
#include "../CL/cl_gl.h"
|
|
@ -1 +0,0 @@
|
|||
#include "../CL/cl_gl_ext.h"
|
|
@ -1 +0,0 @@
|
|||
#include "../CL/cl_platform.h"
|
|
@ -1 +0,0 @@
|
|||
#include "../CL/opencl.h"
|
|
@ -1,193 +0,0 @@
|
|||
/* pocl/_kernel_renames.h - Rename OpenCL builtin functions to avoid name
|
||||
clashes with libm functions which are called in implementation.
|
||||
|
||||
Copyright (c) 2011-2013 Erik Schnetter <eschnetter@perimeterinstitute.ca>
|
||||
Perimeter Institute for Theoretical Physics
|
||||
Copyright (c) 2011-2017 Pekka Jääskeläinen / TUT
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _KERNEL_RENAMES_H
|
||||
#define _KERNEL_RENAMES_H
|
||||
|
||||
/* Move built-in declarations and libm functions out of the way.
|
||||
(There should be a better way of doing so. These functions are
|
||||
built-in math functions for OpenCL (see Clang's "Builtins.def").
|
||||
Functions defined in libc or libm may also
|
||||
interfere with OpenCL's functions, since their prototypes will be
|
||||
wrong. */
|
||||
#define abs _cl_abs
|
||||
#define abs_diff _cl_abs_diff
|
||||
#define acos _cl_acos
|
||||
#define acosh _cl_acosh
|
||||
#define acospi _cl_acospi
|
||||
#define add_sat _cl_add_sat
|
||||
#define all _cl_all
|
||||
#define any _cl_any
|
||||
#define asin _cl_asin
|
||||
#define asinh _cl_asinh
|
||||
#define asinpi _cl_asinpi
|
||||
#define atan _cl_atan
|
||||
#define atan2 _cl_atan2
|
||||
#define atan2pi _cl_atan2pi
|
||||
#define atanh _cl_atanh
|
||||
#define atanpi _cl_atanpi
|
||||
#define bitselect _cl_bitselect
|
||||
#define cbrt _cl_cbrt
|
||||
#define ceil _cl_ceil
|
||||
#define clamp _cl_clamp
|
||||
#define clz _cl_clz
|
||||
#define copysign _cl_copysign
|
||||
#define cos _cl_cos
|
||||
#define cosh _cl_cosh
|
||||
#define cospi _cl_cospi
|
||||
#define cross _cl_cross
|
||||
#define degrees _cl_degrees
|
||||
#define distance _cl_distance
|
||||
#define dot _cl_dot
|
||||
#define erf _cl_erf
|
||||
#define erfc _cl_erfc
|
||||
#define exp _cl_exp
|
||||
#define exp10 _cl_exp10
|
||||
#define exp2 _cl_exp2
|
||||
#define expm1 _cl_expm1
|
||||
#define fabs _cl_fabs
|
||||
#define fast_distance _cl_fast_distance
|
||||
#define fast_length _cl_fast_length
|
||||
#define fast_normalize _cl_fast_normalize
|
||||
#define fdim _cl_fdim
|
||||
#define floor _cl_floor
|
||||
#define fma _cl_fma
|
||||
#define fmax _cl_fmax
|
||||
#define fmin _cl_fmin
|
||||
#define fmod _cl_fmod
|
||||
#define fract _cl_fract
|
||||
#define frexp _cl_frexp
|
||||
#define hadd _cl_hadd
|
||||
#define half_cos _cl_half_cos
|
||||
#define half_divide _cl_half_divide
|
||||
#define half_exp _cl_half_exp
|
||||
#define half_exp10 _cl_half_exp10
|
||||
#define half_exp2 _cl_half_exp2
|
||||
#define half_log _cl_half_log
|
||||
#define half_log10 _cl_half_log10
|
||||
#define half_log2 _cl_half_log2
|
||||
#define half_powr _cl_half_powr
|
||||
#define half_recip _cl_half_recip
|
||||
#define half_rsqrt _cl_half_rsqrt
|
||||
#define half_sin _cl_half_sin
|
||||
#define half_sqrt _cl_half_sqrt
|
||||
#define half_tan _cl_half_tan
|
||||
#define hypot _cl_hypot
|
||||
#define ilogb _cl_ilogb
|
||||
#define isequal _cl_isequal
|
||||
#define isfinite _cl_isfinite
|
||||
#define isgreater _cl_isgreater
|
||||
#define isgreaterequal _cl_isgreaterequal
|
||||
#define isinf _cl_isinf
|
||||
#define isless _cl_isless
|
||||
#define islessequal _cl_islessequal
|
||||
#define islessgreater _cl_islessgreater
|
||||
#define isnan _cl_isnan
|
||||
#define isnormal _cl_isnormal
|
||||
#define isnotequal _cl_isnotequal
|
||||
#define isordered _cl_isordered
|
||||
#define isunordered _cl_isunordered
|
||||
#define ldexp _cl_ldexp
|
||||
#define length _cl_length
|
||||
#define lgamma _cl_lgamma
|
||||
#define lgamma_r _cl_lgamma_r
|
||||
#define log _cl_log
|
||||
#define log10 _cl_log10
|
||||
#define log1p _cl_log1p
|
||||
#define log2 _cl_log2
|
||||
#define logb _cl_logb
|
||||
#define mad _cl_mad
|
||||
#define mad24 _cl_mad24
|
||||
#define mad_hi _cl_mad_hi
|
||||
#define mad_sat _cl_mad_sat
|
||||
#define max _cl_max
|
||||
#define maxmag _cl_maxmag
|
||||
#define min _cl_min
|
||||
#define minmag _cl_minmag
|
||||
#define mix _cl_mix
|
||||
#define modf _cl_modf
|
||||
#define mul24 _cl_mul24
|
||||
#define mul_hi _cl_mul_hi
|
||||
#define nan _cl_nan
|
||||
#define native_cos _cl_native_cos
|
||||
#define native_divide _cl_native_divide
|
||||
#define native_exp _cl_native_exp
|
||||
#define native_exp10 _cl_native_exp10
|
||||
#define native_exp2 _cl_native_exp2
|
||||
#define native_log _cl_native_log
|
||||
#define native_log10 _cl_native_log10
|
||||
#define native_log2 _cl_native_log2
|
||||
#define native_powr _cl_native_powr
|
||||
#define native_recip _cl_native_recip
|
||||
#define native_rsqrt _cl_native_rsqrt
|
||||
#define native_sin _cl_native_sin
|
||||
#define native_sqrt _cl_native_sqrt
|
||||
#define native_tan _cl_native_tan
|
||||
#define nextafter _cl_nextafter
|
||||
#define normalize _cl_normalize
|
||||
#define popcount _cl_popcount
|
||||
#define pow _cl_pow
|
||||
#define pown _cl_pown
|
||||
#define powr _cl_powr
|
||||
#define radians _cl_radians
|
||||
#define remainder _cl_remainder
|
||||
#define remquo _cl_remquo
|
||||
#define rhadd _cl_rhadd
|
||||
#define rint _cl_rint
|
||||
#define rootn _cl_rootn
|
||||
#define rotate _cl_rotate
|
||||
#define round _cl_round
|
||||
#define rsqrt _cl_rsqrt
|
||||
#define select _cl_select
|
||||
#define sign _cl_sign
|
||||
#define signbit _cl_signbit
|
||||
#define sin _cl_sin
|
||||
#define sincos _cl_sincos
|
||||
#define sinh _cl_sinh
|
||||
#define sinpi _cl_sinpi
|
||||
#define smoothstep _cl_smoothstep
|
||||
#define sqrt _cl_sqrt
|
||||
#define step _cl_step
|
||||
#define sub_sat _cl_sub_sat
|
||||
#define tan _cl_tan
|
||||
#define tanh _cl_tanh
|
||||
#define tanpi _cl_tanpi
|
||||
#define tgamma _cl_tgamma
|
||||
#define trunc _cl_trunc
|
||||
#define upsample _cl_upsample
|
||||
#define atom_add atomic_add
|
||||
#define atom_sub atomic_sub
|
||||
#define atom_xchg atomic_xchg
|
||||
#define atom_inc atomic_inc
|
||||
#define atom_dec atomic_dec
|
||||
#define atom_cmpxchg atomic_cmpxchg
|
||||
#define atom_min atomic_min
|
||||
#define atom_max atomic_max
|
||||
#define atom_and atomic_and
|
||||
#define atom_or atomic_or
|
||||
#define atom_xor atomic_xor
|
||||
|
||||
#endif
|
|
@ -1,91 +0,0 @@
|
|||
/* This file includes opencl-c.h from Clang and fixes a few pocl extras.
|
||||
|
||||
Copyright (c) 2011-2017 Pekka Jääskeläinen / TUT
|
||||
Copyright (c) 2017 Michal Babej / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _OPENCL_H_
|
||||
/* Use the declarations shipped with Clang. */
|
||||
/* Check for _OPENCL_H already here because the kernel compiler loads the
|
||||
header beforehand, but cannot find the file due to include paths not
|
||||
set up. */
|
||||
#include <opencl-c.h>
|
||||
|
||||
/* Missing declarations from opencl-c.h. Some of the geometric builtins are
|
||||
defined only up to 4 vectors, but we implement them all: */
|
||||
#ifdef cl_khr_fp16
|
||||
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
||||
half _CL_OVERLOADABLE _CL_READNONE length (half8 p);
|
||||
half _CL_OVERLOADABLE _CL_READNONE length (half16 p);
|
||||
|
||||
half _CL_OVERLOADABLE _CL_READNONE fast_length (half8 p);
|
||||
half _CL_OVERLOADABLE _CL_READNONE fast_length (half16 p);
|
||||
|
||||
half8 _CL_OVERLOADABLE _CL_READNONE normalize (half8 p);
|
||||
half16 _CL_OVERLOADABLE _CL_READNONE normalize (half16 p);
|
||||
|
||||
half8 _CL_OVERLOADABLE _CL_READNONE fast_normalize (half8 p);
|
||||
half16 _CL_OVERLOADABLE _CL_READNONE fast_normalize (half16 p);
|
||||
|
||||
half _CL_OVERLOADABLE _CL_READNONE dot (half8 p0, half8 p1);
|
||||
half _CL_OVERLOADABLE _CL_READNONE dot (half16 p0, half16 p1);
|
||||
#endif
|
||||
|
||||
float _CL_OVERLOADABLE _CL_READNONE length (float8 p);
|
||||
float _CL_OVERLOADABLE _CL_READNONE length (float16 p);
|
||||
|
||||
float _CL_OVERLOADABLE _CL_READNONE fast_length (float8 p);
|
||||
float _CL_OVERLOADABLE _CL_READNONE fast_length (float16 p);
|
||||
|
||||
float8 _CL_OVERLOADABLE _CL_READNONE normalize (float8 p);
|
||||
float16 _CL_OVERLOADABLE _CL_READNONE normalize (float16 p);
|
||||
|
||||
float8 _CL_OVERLOADABLE _CL_READNONE fast_normalize (float8 p);
|
||||
float16 _CL_OVERLOADABLE _CL_READNONE fast_normalize (float16 p);
|
||||
|
||||
float _CL_OVERLOADABLE _CL_READNONE dot (float8 p0, float8 p1);
|
||||
float _CL_OVERLOADABLE _CL_READNONE dot (float16 p0, float16 p1);
|
||||
|
||||
#ifdef cl_khr_fp64
|
||||
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
|
||||
double _CL_OVERLOADABLE _CL_READNONE length (double8 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE length (double16 p);
|
||||
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double2 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double3 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double4 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double8 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double16 p);
|
||||
|
||||
double8 _CL_OVERLOADABLE _CL_READNONE normalize (double8 p);
|
||||
double16 _CL_OVERLOADABLE _CL_READNONE normalize (double16 p);
|
||||
|
||||
double8 _CL_OVERLOADABLE _CL_READNONE fast_normalize (double8 p);
|
||||
double16 _CL_OVERLOADABLE _CL_READNONE fast_normalize (double16 p);
|
||||
|
||||
double _CL_OVERLOADABLE _CL_READNONE dot (double8 p0, double8 p1);
|
||||
double _CL_OVERLOADABLE _CL_READNONE dot (double16 p0, double16 p1);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,58 +0,0 @@
|
|||
/* Enable all extensions known to pocl, which a device supports.
|
||||
* This is required at the start of include/_kernel.h for prototypes,
|
||||
* then at kernel lib compilation phase (because _kernel.h disables
|
||||
* everything at the end).
|
||||
*/
|
||||
|
||||
/* OpenCL 1.0-only extensions */
|
||||
|
||||
#if (__OPENCL_C_VERSION__ < 110)
|
||||
|
||||
#ifdef cl_khr_global_int32_base_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_global_int32_extended_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_local_int32_base_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_local_int32_base_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_local_int32_extended_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_byte_addressable_store
|
||||
# pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* all versions */
|
||||
#ifdef cl_khr_fp16
|
||||
# pragma OPENCL EXTENSION cl_khr_fp16: enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_fp64
|
||||
# pragma OPENCL EXTENSION cl_khr_fp64: enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_int64_base_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_int64_extended_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable
|
||||
#endif
|
||||
|
||||
#if (__clang_major__ > 4)
|
||||
|
||||
#ifdef cl_khr_3d_image_writes
|
||||
# pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -1,233 +0,0 @@
|
|||
/* pocl/_kernel.h - OpenCL types and runtime library
|
||||
functions declarations. This should be included only from OpenCL C files.
|
||||
|
||||
Copyright (c) 2011 Universidad Rey Juan Carlos
|
||||
Copyright (c) 2011-2017 Pekka Jääskeläinen / TUT
|
||||
Copyright (c) 2011-2013 Erik Schnetter <eschnetter@perimeterinstitute.ca>
|
||||
Perimeter Institute for Theoretical Physics
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* If the -cl-std build option is not specified, the highest OpenCL C 1.x
|
||||
* language version supported by each device is used as the version of
|
||||
* OpenCL C when compiling the program for each device.
|
||||
*/
|
||||
#ifndef __OPENCL_C_VERSION__
|
||||
#define __OPENCL_C_VERSION__ 120
|
||||
#endif
|
||||
|
||||
#if (__OPENCL_C_VERSION__ > 99)
|
||||
#define CL_VERSION_1_0 100
|
||||
#endif
|
||||
|
||||
#if (__OPENCL_C_VERSION__ > 109)
|
||||
#define CL_VERSION_1_1 110
|
||||
#endif
|
||||
|
||||
#if (__OPENCL_C_VERSION__ > 119)
|
||||
#define CL_VERSION_1_2 120
|
||||
#endif
|
||||
|
||||
#if (__OPENCL_C_VERSION__ > 199)
|
||||
#define CL_VERSION_2_0 200
|
||||
#endif
|
||||
|
||||
#include "_enable_all_exts.h"
|
||||
|
||||
#include "_builtin_renames.h"
|
||||
|
||||
/* Define some feature test macros to help write generic code. These are used
|
||||
* mostly in _pocl_opencl.h header + some .cl files in kernel library */
|
||||
|
||||
#ifdef cl_khr_int64
|
||||
# define __IF_INT64(x) x
|
||||
#else
|
||||
# define __IF_INT64(x)
|
||||
#endif
|
||||
#ifdef cl_khr_fp16
|
||||
# define __IF_FP16(x) x
|
||||
#else
|
||||
# define __IF_FP16(x)
|
||||
#endif
|
||||
#ifdef cl_khr_fp64
|
||||
# define __IF_FP64(x) x
|
||||
#else
|
||||
# define __IF_FP64(x)
|
||||
#endif
|
||||
#ifdef cl_khr_int64_base_atomics
|
||||
#define __IF_BA64(x) x
|
||||
#else
|
||||
#define __IF_BA64(x)
|
||||
#endif
|
||||
#ifdef cl_khr_int64_extended_atomics
|
||||
#define __IF_EA64(x) x
|
||||
#else
|
||||
#define __IF_EA64(x)
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Function/type attributes supported by Clang/SPIR */
|
||||
#if __has_attribute(__always_inline__)
|
||||
# define _CL_ALWAYSINLINE __attribute__((__always_inline__))
|
||||
#else
|
||||
# define _CL_ALWAYSINLINE
|
||||
#endif
|
||||
#if __has_attribute(__noinline__)
|
||||
# define _CL_NOINLINE __attribute__((__noinline__))
|
||||
#else
|
||||
# define _CL_NOINLINE
|
||||
#endif
|
||||
#if __has_attribute(__overloadable__)
|
||||
# define _CL_OVERLOADABLE __attribute__((__overloadable__))
|
||||
#else
|
||||
# define _CL_OVERLOADABLE
|
||||
#endif
|
||||
#if __has_attribute(__pure__)
|
||||
# define _CL_READONLY __attribute__((__pure__))
|
||||
#else
|
||||
# define _CL_READONLY
|
||||
#endif
|
||||
#if __has_attribute(__const__)
|
||||
# define _CL_READNONE __attribute__((__const__))
|
||||
#else
|
||||
# define _CL_READNONE
|
||||
#endif
|
||||
#if __has_attribute(convergent)
|
||||
# define _CL_CONVERGENT __attribute__((convergent))
|
||||
#else
|
||||
# define _CL_CONVERGENT
|
||||
#endif
|
||||
|
||||
/************************ setup Clang version macros ******************/
|
||||
|
||||
#if (__clang_major__ == 6)
|
||||
|
||||
# undef LLVM_6_0
|
||||
# define LLVM_6_0
|
||||
|
||||
#elif (__clang_major__ == 7)
|
||||
|
||||
# undef LLVM_7_0
|
||||
# define LLVM_7_0
|
||||
|
||||
#elif (__clang_major__ == 8)
|
||||
|
||||
# undef LLVM_8_0
|
||||
# define LLVM_8_0
|
||||
|
||||
#elif (__clang_major__ == 9)
|
||||
|
||||
# undef LLVM_9_0
|
||||
# define LLVM_9_0
|
||||
|
||||
#elif (__clang_major__ == 10)
|
||||
|
||||
# undef LLVM_10_0
|
||||
# define LLVM_10_0
|
||||
|
||||
#else
|
||||
|
||||
#error Unsupported Clang/LLVM version.
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef LLVM_10_0
|
||||
#define LLVM_OLDER_THAN_10_0 1
|
||||
|
||||
#ifndef LLVM_9_0
|
||||
#define LLVM_OLDER_THAN_9_0 1
|
||||
|
||||
#ifndef LLVM_8_0
|
||||
#define LLVM_OLDER_THAN_8_0 1
|
||||
|
||||
#ifndef LLVM_7_0
|
||||
#define LLVM_OLDER_THAN_7_0 1
|
||||
|
||||
#ifndef LLVM_6_0
|
||||
#define LLVM_OLDER_THAN_6_0 1
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* A static assert statement to catch inconsistencies at build time */
|
||||
#if __has_extension(__c_static_assert__)
|
||||
# define _CL_STATIC_ASSERT(_t, _x) _Static_assert(_x, #_t)
|
||||
#else
|
||||
# define _CL_STATIC_ASSERT(_t, _x) typedef int __cl_ai##_t[(x) ? 1 : -1];
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#define IMG_RO_AQ __read_only
|
||||
#define IMG_WO_AQ __write_only
|
||||
|
||||
#if (__OPENCL_C_VERSION__ > 199)
|
||||
#define CLANG_HAS_RW_IMAGES
|
||||
#define IMG_RW_AQ __read_write
|
||||
#else
|
||||
#undef CLANG_HAS_RW_IMAGES
|
||||
#define IMG_RW_AQ __RW_IMAGES_UNSUPPORTED_BEFORE_CL_20
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
/* use Clang opencl header for definitions. */
|
||||
|
||||
#ifdef POCL_DEVICE_ADDRESS_BITS
|
||||
|
||||
/* If we wish to override the Clang set __SIZE_TYPE__ for this target,
|
||||
let's do it here so the opencl-c.h sets size_t to the wanted type. */
|
||||
|
||||
#ifdef __SIZE_TYPE__
|
||||
#undef __SIZE_TYPE__
|
||||
#endif
|
||||
|
||||
#if POCL_DEVICE_ADDRESS_BITS == 32
|
||||
#define __SIZE_TYPE__ uint
|
||||
#elif POCL_DEVICE_ADDRESS_BITS == 64
|
||||
#define __SIZE_TYPE__ ulong
|
||||
#else
|
||||
#error Unsupported POCL_DEVICE_ADDRESS_BITS value.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include "_clang_opencl.h"
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* GNU's libm seems to use INT_MIN here while the Clang's header uses
|
||||
INT_MAX. Both are allowed by the OpenCL specs, but we want them to
|
||||
be unified to avoid failing tests. */
|
||||
#undef FP_ILOGBNAN
|
||||
#undef FP_ILOGB0
|
||||
#define FP_ILOGBNAN INT_MIN
|
||||
#define FP_ILOGB0 INT_MIN
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#include "pocl_image_types.h"
|
||||
|
||||
#pragma OPENCL EXTENSION all : disable
|
|
@ -1,189 +0,0 @@
|
|||
/* pocl/_kernel_c.h - C compatible OpenCL types and runtime library
|
||||
functions declarations for kernel builtin implementations using C.
|
||||
|
||||
Copyright (c) 2011 Universidad Rey Juan Carlos
|
||||
Copyright (c) 2011-2017 Pekka Jääskeläinen / TUT
|
||||
Copyright (c) 2011-2013 Erik Schnetter <eschnetter@perimeterinstitute.ca>
|
||||
Perimeter Institute for Theoretical Physics
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* Header that can be implemented in C compiled implementations of
|
||||
* built-in functions to introduce the OpenCL C compatible types etc.
|
||||
*/
|
||||
#ifndef _KERNEL_C_H
|
||||
#define _KERNEL_C_H
|
||||
|
||||
#include "pocl_types.h"
|
||||
|
||||
#include "_kernel_constants.h"
|
||||
|
||||
/* Function/type attributes supported by Clang/SPIR */
|
||||
#if __has_attribute(__always_inline__)
|
||||
# define _CL_ALWAYSINLINE __attribute__((__always_inline__))
|
||||
#else
|
||||
# define _CL_ALWAYSINLINE
|
||||
#endif
|
||||
#if __has_attribute(__noinline__)
|
||||
# define _CL_NOINLINE __attribute__((__noinline__))
|
||||
#else
|
||||
# define _CL_NOINLINE
|
||||
#endif
|
||||
#if __has_attribute(__overloadable__)
|
||||
# define _CL_OVERLOADABLE __attribute__((__overloadable__))
|
||||
#else
|
||||
# define _CL_OVERLOADABLE
|
||||
#endif
|
||||
#if __has_attribute(__pure__)
|
||||
# define _CL_READONLY __attribute__((__pure__))
|
||||
#else
|
||||
# define _CL_READONLY
|
||||
#endif
|
||||
#if __has_attribute(__const__)
|
||||
# define _CL_READNONE __attribute__((__const__))
|
||||
#else
|
||||
# define _CL_READNONE
|
||||
#endif
|
||||
#if __has_attribute(convergent)
|
||||
# define _CL_CONVERGENT __attribute__((convergent))
|
||||
#else
|
||||
# define _CL_CONVERGENT
|
||||
#endif
|
||||
|
||||
|
||||
typedef char char2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef char char3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef char char4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef char char8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef char char16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef uchar uchar2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef uchar uchar3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef uchar uchar4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef uchar uchar8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef uchar uchar16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef short short2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef short short3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef short short4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef short short8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef short short16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef ushort ushort2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef ushort ushort3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef ushort ushort4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef ushort ushort8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef ushort ushort16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef int int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int int8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef int int16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef uint uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef uint uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef uint uint4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef uint uint8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef uint uint16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
#if defined(__CBUILD__) && defined(cl_khr_fp16)
|
||||
/* NOTE: the Clang's __fp16 does not work robustly in C mode,
|
||||
it might produce invalid code at least with half vectors.
|
||||
Using the native 'half' type in OpenCL C mode works better. */
|
||||
typedef __fp16 half;
|
||||
#endif
|
||||
|
||||
typedef half half2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef half half3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef half half4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef half half8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef half half16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef float float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef float float8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef float float16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
#ifdef cl_khr_fp64
|
||||
# ifndef __CBUILD__
|
||||
# pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
# endif
|
||||
typedef double double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double double8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef double double16 __attribute__((__ext_vector_type__(16)));
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_int64
|
||||
typedef long long2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef long long3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef long long4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef long long8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef long long16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef ulong ulong2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef ulong ulong3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef ulong ulong4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef ulong ulong8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef ulong ulong16 __attribute__((__ext_vector_type__(16)));
|
||||
#endif
|
||||
|
||||
#if defined(__TCE__)
|
||||
|
||||
#define POCL_ADDRESS_SPACE_PRIVATE 0
|
||||
#define POCL_ADDRESS_SPACE_GLOBAL 1
|
||||
#define POCL_ADDRESS_SPACE_LOCAL 3
|
||||
#define POCL_ADDRESS_SPACE_CONSTANT 2
|
||||
#define POCL_ADDRESS_SPACE_GENERIC 6
|
||||
|
||||
#endif
|
||||
|
||||
typedef uint cl_mem_fence_flags;
|
||||
|
||||
/* Integer Constants */
|
||||
|
||||
#if defined(__CBUILD__)
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define INT_MAX 2147483647
|
||||
#define INT_MIN (-2147483647 - 1)
|
||||
#ifdef cl_khr_int64
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LONG_MIN (-0x7fffffffffffffffL - 1)
|
||||
#endif
|
||||
#define SCHAR_MAX 127
|
||||
#define SCHAR_MIN (-127 - 1)
|
||||
#define SHRT_MAX 32767
|
||||
#define SHRT_MIN (-32767 - 1)
|
||||
#define UCHAR_MAX 255
|
||||
#define USHRT_MAX 65535
|
||||
#define UINT_MAX 0xffffffff
|
||||
#ifdef cl_khr_int64
|
||||
#define ULONG_MAX 0xffffffffffffffffUL
|
||||
#endif
|
||||
|
||||
#endif /* __CBUILD__ */
|
||||
|
||||
#endif
|
|
@ -1,93 +0,0 @@
|
|||
/* pocl/_kernel_constants.h - C compatible OpenCL types and runtime library
|
||||
constants declarations.
|
||||
|
||||
Copyright (c) 2011 Universidad Rey Juan Carlos
|
||||
Copyright (c) 2011-2013 Pekka Jääskeläinen / TUT
|
||||
Copyright (c) 2011-2013 Erik Schnetter <eschnetter@perimeterinstitute.ca>
|
||||
Perimeter Institute for Theoretical Physics
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* Header that can be implemented in C compiled implementations of
|
||||
* built-in functions to introduce the OpenCL C compatible constants.
|
||||
*/
|
||||
#ifndef _KERNEL_CONSTANTS_H
|
||||
#define _KERNEL_CONSTANTS_H
|
||||
|
||||
/* clang's header defines these */
|
||||
#ifndef _OPENCL_H_
|
||||
|
||||
/* cl_channel_order */
|
||||
#define CLK_R 0x10B0
|
||||
#define CLK_A 0x10B1
|
||||
#define CLK_RG 0x10B2
|
||||
#define CLK_RA 0x10B3
|
||||
#define CLK_RGB 0x10B4
|
||||
#define CLK_RGBA 0x10B5
|
||||
#define CLK_BGRA 0x10B6
|
||||
#define CLK_ARGB 0x10B7
|
||||
#define CLK_INTENSITY 0x10B8
|
||||
#define CLK_LUMINANCE 0x10B9
|
||||
#define CLK_Rx 0x10BA
|
||||
#define CLK_RGx 0x10BB
|
||||
#define CLK_RGBx 0x10BC
|
||||
#define CLK_DEPTH 0x10BD
|
||||
#define CLK_DEPTH_STENCIL 0x10BE
|
||||
|
||||
/* cl_channel_type */
|
||||
#define CLK_SNORM_INT8 0x10D0
|
||||
#define CLK_SNORM_INT16 0x10D1
|
||||
#define CLK_UNORM_INT8 0x10D2
|
||||
#define CLK_UNORM_INT16 0x10D3
|
||||
#define CLK_UNORM_SHORT_565 0x10D4
|
||||
#define CLK_UNORM_SHORT_555 0x10D5
|
||||
#define CLK_UNORM_INT_101010 0x10D6
|
||||
#define CLK_SIGNED_INT8 0x10D7
|
||||
#define CLK_SIGNED_INT16 0x10D8
|
||||
#define CLK_SIGNED_INT32 0x10D9
|
||||
#define CLK_UNSIGNED_INT8 0x10DA
|
||||
#define CLK_UNSIGNED_INT16 0x10DB
|
||||
#define CLK_UNSIGNED_INT32 0x10DC
|
||||
#define CLK_HALF_FLOAT 0x10DD
|
||||
#define CLK_FLOAT 0x10DE
|
||||
#define CLK_UNORM_INT24 0x10DF
|
||||
|
||||
/* cl_addressing _mode */
|
||||
#define CLK_ADDRESS_NONE 0x00
|
||||
#define CLK_ADDRESS_CLAMP_TO_EDGE 0x02
|
||||
#define CLK_ADDRESS_CLAMP 0x04
|
||||
#define CLK_ADDRESS_REPEAT 0x06
|
||||
#define CLK_ADDRESS_MIRRORED_REPEAT 0x08
|
||||
|
||||
/* cl_sampler_info */
|
||||
#define CLK_NORMALIZED_COORDS_FALSE 0x00
|
||||
#define CLK_NORMALIZED_COORDS_TRUE 0x01
|
||||
|
||||
/* filter_mode */
|
||||
#define CLK_FILTER_NEAREST 0x10
|
||||
#define CLK_FILTER_LINEAR 0x20
|
||||
|
||||
/* barrier() flags */
|
||||
#define CLK_LOCAL_MEM_FENCE 0x01
|
||||
#define CLK_GLOBAL_MEM_FENCE 0x02
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,395 +0,0 @@
|
|||
/* pocl.h - global pocl declarations for the host side runtime.
|
||||
|
||||
Copyright (c) 2011 Universidad Rey Juan Carlos
|
||||
2011-2019 Pekka Jääskeläinen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file pocl.h
|
||||
*
|
||||
* The declarations in this file are such that are used both in the
|
||||
* libpocl implementation CL and the kernel compiler. Others should be
|
||||
* moved to pocl_cl.h of lib/CL or under the kernel compiler dir.
|
||||
* @todo Check if there are extra declarations here that could be moved.
|
||||
*/
|
||||
#ifndef POCL_H
|
||||
#define POCL_H
|
||||
|
||||
#ifndef CL_TARGET_OPENCL_VERSION
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
#include <CL/opencl.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "pocl_context.h"
|
||||
|
||||
/* detects restrict, variadic macros etc */
|
||||
#include "pocl_compiler_features.h"
|
||||
|
||||
#define POCL_FILENAME_LENGTH 1024
|
||||
|
||||
#define WORKGROUP_STRING_LENGTH 1024
|
||||
|
||||
typedef struct _mem_mapping mem_mapping_t;
|
||||
/* represents a single buffer to host memory mapping */
|
||||
struct _mem_mapping {
|
||||
void *host_ptr; /* the location of the mapped buffer chunk in the host memory */
|
||||
size_t offset; /* offset to the beginning of the buffer */
|
||||
size_t size;
|
||||
mem_mapping_t *prev, *next;
|
||||
/* This is required, because two clEnqueueMap() with the same buffer+size+offset,
|
||||
will create two identical mappings in the buffer->mappings LL.
|
||||
Without this flag, both corresponding clEnqUnmap()s will find
|
||||
the same mapping (the first one in mappings LL), which will lead
|
||||
to memory double-free corruption later. */
|
||||
long unmap_requested;
|
||||
cl_map_flags map_flags;
|
||||
/* image mapping data */
|
||||
size_t origin[3];
|
||||
size_t region[3];
|
||||
size_t row_pitch;
|
||||
size_t slice_pitch;
|
||||
};
|
||||
|
||||
/* memory identifier: id to point the global memory where memory resides
|
||||
+ pointer to actual data */
|
||||
typedef struct _pocl_mem_identifier
|
||||
{
|
||||
int available; /* ... in this mem objs context */
|
||||
int global_mem_id;
|
||||
void *mem_ptr;
|
||||
void *image_data;
|
||||
} pocl_mem_identifier;
|
||||
|
||||
typedef struct _mem_destructor_callback mem_destructor_callback_t;
|
||||
/* represents a memory object destructor callback */
|
||||
struct _mem_destructor_callback
|
||||
{
|
||||
void (CL_CALLBACK * pfn_notify) (cl_mem, void*); /* callback function */
|
||||
void *user_data; /* user supplied data passed to callback function */
|
||||
mem_destructor_callback_t *next;
|
||||
};
|
||||
|
||||
typedef struct _build_program_callback build_program_callback_t;
|
||||
struct _build_program_callback
|
||||
{
|
||||
void (CL_CALLBACK * callback_function) (cl_program, void*); /* callback function */
|
||||
void *user_data; /* user supplied data passed to callback function */
|
||||
};
|
||||
|
||||
// Command Queue datatypes
|
||||
|
||||
#define POCL_KERNEL_DIGEST_SIZE 16
|
||||
typedef uint8_t pocl_kernel_hash_t[POCL_KERNEL_DIGEST_SIZE];
|
||||
|
||||
// clEnqueueNDRangeKernel
|
||||
typedef struct
|
||||
{
|
||||
void *hash;
|
||||
void *wg; /* The work group function ptr. Device specific. */
|
||||
cl_kernel kernel;
|
||||
/* The launch data that can be passed to the kernel execution environment. */
|
||||
struct pocl_context pc;
|
||||
struct pocl_argument *arguments;
|
||||
/* Can be used to store/cache arbitrary device-specific data. */
|
||||
void *device_data;
|
||||
/* If set to 1, disallow any work-group function specialization. */
|
||||
int force_generic_wg_func;
|
||||
/* If set to 1, disallow "small grid" WG function specialization. */
|
||||
int force_large_grid_wg_func;
|
||||
unsigned device_i;
|
||||
} _cl_command_run;
|
||||
|
||||
// clEnqueueNativeKernel
|
||||
typedef struct
|
||||
{
|
||||
void *args;
|
||||
size_t cb_args;
|
||||
void (*user_func)(void *);
|
||||
} _cl_command_native;
|
||||
|
||||
// clEnqueueReadBuffer
|
||||
typedef struct
|
||||
{
|
||||
void *__restrict__ dst_host_ptr;
|
||||
pocl_mem_identifier *src_mem_id;
|
||||
size_t offset;
|
||||
size_t size;
|
||||
} _cl_command_read;
|
||||
|
||||
// clEnqueueWriteBuffer
|
||||
typedef struct
|
||||
{
|
||||
const void *__restrict__ src_host_ptr;
|
||||
pocl_mem_identifier *dst_mem_id;
|
||||
size_t offset;
|
||||
size_t size;
|
||||
} _cl_command_write;
|
||||
|
||||
// clEnqueueCopyBuffer
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *src_mem_id;
|
||||
pocl_mem_identifier *dst_mem_id;
|
||||
size_t src_offset;
|
||||
size_t dst_offset;
|
||||
size_t size;
|
||||
} _cl_command_copy;
|
||||
|
||||
// clEnqueueReadBufferRect
|
||||
typedef struct
|
||||
{
|
||||
void *__restrict__ dst_host_ptr;
|
||||
pocl_mem_identifier *src_mem_id;
|
||||
size_t buffer_origin[3];
|
||||
size_t host_origin[3];
|
||||
size_t region[3];
|
||||
size_t buffer_row_pitch;
|
||||
size_t buffer_slice_pitch;
|
||||
size_t host_row_pitch;
|
||||
size_t host_slice_pitch;
|
||||
} _cl_command_read_rect;
|
||||
|
||||
// clEnqueueWriteBufferRect
|
||||
typedef struct
|
||||
{
|
||||
const void *__restrict__ src_host_ptr;
|
||||
pocl_mem_identifier *dst_mem_id;
|
||||
size_t buffer_origin[3];
|
||||
size_t host_origin[3];
|
||||
size_t region[3];
|
||||
size_t buffer_row_pitch;
|
||||
size_t buffer_slice_pitch;
|
||||
size_t host_row_pitch;
|
||||
size_t host_slice_pitch;
|
||||
} _cl_command_write_rect;
|
||||
|
||||
// clEnqueueCopyBufferRect
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *src_mem_id;
|
||||
pocl_mem_identifier *dst_mem_id;
|
||||
size_t dst_origin[3];
|
||||
size_t src_origin[3];
|
||||
size_t region[3];
|
||||
size_t src_row_pitch;
|
||||
size_t src_slice_pitch;
|
||||
size_t dst_row_pitch;
|
||||
size_t dst_slice_pitch;
|
||||
} _cl_command_copy_rect;
|
||||
|
||||
// clEnqueueMapBuffer
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *mem_id;
|
||||
mem_mapping_t *mapping;
|
||||
} _cl_command_map;
|
||||
|
||||
/* clEnqueueUnMapMemObject */
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *mem_id;
|
||||
mem_mapping_t *mapping;
|
||||
} _cl_command_unmap;
|
||||
|
||||
/* clEnqueueFillBuffer */
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *dst_mem_id;
|
||||
size_t size;
|
||||
size_t offset;
|
||||
void *__restrict__ pattern;
|
||||
size_t pattern_size;
|
||||
} _cl_command_fill_mem;
|
||||
|
||||
/* clEnqueue(Write/Read)Image */
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *src_mem_id;
|
||||
void *__restrict__ dst_host_ptr;
|
||||
pocl_mem_identifier *dst_mem_id;
|
||||
size_t dst_offset;
|
||||
size_t origin[3];
|
||||
size_t region[3];
|
||||
size_t dst_row_pitch;
|
||||
size_t dst_slice_pitch;
|
||||
} _cl_command_read_image;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *dst_mem_id;
|
||||
const void *__restrict__ src_host_ptr;
|
||||
pocl_mem_identifier *src_mem_id;
|
||||
size_t src_offset;
|
||||
size_t origin[3];
|
||||
size_t region[3];
|
||||
size_t src_row_pitch;
|
||||
size_t src_slice_pitch;
|
||||
} _cl_command_write_image;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *src_mem_id;
|
||||
pocl_mem_identifier *dst_mem_id;
|
||||
size_t dst_origin[3];
|
||||
size_t src_origin[3];
|
||||
size_t region[3];
|
||||
} _cl_command_copy_image;
|
||||
|
||||
/* clEnqueueFillImage */
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *mem_id;
|
||||
size_t origin[3];
|
||||
size_t region[3];
|
||||
void *__restrict__ fill_pixel;
|
||||
size_t pixel_size;
|
||||
} _cl_command_fill_image;
|
||||
|
||||
/* clEnqueueMarkerWithWaitlist */
|
||||
typedef struct
|
||||
{
|
||||
void *data;
|
||||
int has_wait_list;
|
||||
} _cl_command_marker;
|
||||
|
||||
/* clEnqueueBarrierWithWaitlist */
|
||||
typedef _cl_command_marker _cl_command_barrier;
|
||||
|
||||
/* clEnqueueMigrateMemObjects */
|
||||
typedef struct
|
||||
{
|
||||
void *data;
|
||||
size_t num_mem_objects;
|
||||
cl_mem *mem_objects;
|
||||
cl_device_id *source_devices;
|
||||
} _cl_command_migrate;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void* data;
|
||||
void* queue;
|
||||
unsigned num_svm_pointers;
|
||||
void **svm_pointers;
|
||||
void (CL_CALLBACK *pfn_free_func) ( cl_command_queue queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void *svm_pointers[],
|
||||
void *user_data);
|
||||
} _cl_command_svm_free;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void* svm_ptr;
|
||||
size_t size;
|
||||
cl_map_flags flags;
|
||||
} _cl_command_svm_map;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void* svm_ptr;
|
||||
} _cl_command_svm_unmap;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const void *__restrict__ src;
|
||||
void *__restrict__ dst;
|
||||
size_t size;
|
||||
} _cl_command_svm_cpy;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *__restrict__ svm_ptr;
|
||||
size_t size;
|
||||
void *__restrict__ pattern;
|
||||
size_t pattern_size;
|
||||
} _cl_command_svm_fill;
|
||||
|
||||
typedef union
|
||||
{
|
||||
_cl_command_run run;
|
||||
_cl_command_native native;
|
||||
|
||||
_cl_command_read read;
|
||||
_cl_command_write write;
|
||||
_cl_command_copy copy;
|
||||
_cl_command_read_rect read_rect;
|
||||
_cl_command_write_rect write_rect;
|
||||
_cl_command_copy_rect copy_rect;
|
||||
_cl_command_fill_mem memfill;
|
||||
|
||||
_cl_command_read_image read_image;
|
||||
_cl_command_write_image write_image;
|
||||
_cl_command_copy_image copy_image;
|
||||
_cl_command_fill_image fill_image;
|
||||
|
||||
_cl_command_map map;
|
||||
_cl_command_unmap unmap;
|
||||
|
||||
_cl_command_marker marker;
|
||||
_cl_command_barrier barrier;
|
||||
_cl_command_migrate migrate;
|
||||
|
||||
_cl_command_svm_free svm_free;
|
||||
_cl_command_svm_map svm_map;
|
||||
_cl_command_svm_unmap svm_unmap;
|
||||
_cl_command_svm_cpy svm_memcpy;
|
||||
_cl_command_svm_fill svm_fill;
|
||||
} _cl_command_t;
|
||||
|
||||
// one item in the command queue
|
||||
typedef struct _cl_command_node _cl_command_node;
|
||||
struct _cl_command_node
|
||||
{
|
||||
_cl_command_t command;
|
||||
cl_command_type type;
|
||||
_cl_command_node *next; // for linked-list storage
|
||||
_cl_command_node *prev;
|
||||
cl_event event;
|
||||
const cl_event *event_wait_list;
|
||||
cl_device_id device;
|
||||
/* The index of the targeted device in the platform's device list. */
|
||||
unsigned device_i;
|
||||
cl_int ready;
|
||||
};
|
||||
|
||||
#ifndef LLVM_10_0
|
||||
#define LLVM_OLDER_THAN_10_0 1
|
||||
|
||||
#ifndef LLVM_9_0
|
||||
#define LLVM_OLDER_THAN_9_0 1
|
||||
|
||||
#ifndef LLVM_8_0
|
||||
#define LLVM_OLDER_THAN_8_0 1
|
||||
|
||||
#ifndef LLVM_7_0
|
||||
#define LLVM_OLDER_THAN_7_0 1
|
||||
|
||||
#ifndef LLVM_6_0
|
||||
#define LLVM_OLDER_THAN_6_0 1
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* POCL_H */
|
|
@ -1,137 +0,0 @@
|
|||
/* pocl_cache.h: global declarations of caching functions used mostly in runtime
|
||||
|
||||
Copyright (c) 2015 pocl developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef POCL_CACHE_H
|
||||
#define POCL_CACHE_H
|
||||
|
||||
#include "pocl_cl.h"
|
||||
|
||||
/* The filename in which the work group (parallelizable) kernel LLVM bc is stored in
|
||||
the kernel's temp dir. */
|
||||
#define POCL_PARALLEL_BC_FILENAME "/parallel.bc"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC visibility push(hidden)
|
||||
#endif
|
||||
|
||||
int pocl_cache_init_topdir ();
|
||||
|
||||
int
|
||||
pocl_cache_create_program_cachedir(cl_program program, unsigned device_i,
|
||||
const char* preprocessed_source, size_t source_len,
|
||||
char *program_bc_path);
|
||||
|
||||
void pocl_cache_cleanup_cachedir(cl_program program);
|
||||
|
||||
int pocl_cl_device_to_index(cl_program program,
|
||||
cl_device_id device);
|
||||
|
||||
int pocl_cache_tempname (char *path_template, const char *suffix, int *fd);
|
||||
|
||||
int pocl_cache_create_tempdir(char* path);
|
||||
|
||||
int pocl_cache_write_program_source(char *program_cl_path,
|
||||
cl_program program);
|
||||
|
||||
int pocl_cache_write_kernel_objfile (char *objfile_path,
|
||||
const char *objfile_content,
|
||||
uint64_t objfile_size);
|
||||
|
||||
int pocl_cache_write_spirv (char *spirv_path,
|
||||
const char *spirv_content,
|
||||
uint64_t file_size);
|
||||
|
||||
int pocl_cache_update_program_last_access(cl_program program,
|
||||
unsigned device_i);
|
||||
|
||||
|
||||
char* pocl_cache_read_buildlog(cl_program program, unsigned device_i);
|
||||
|
||||
int pocl_cache_append_to_buildlog(cl_program program,
|
||||
unsigned device_i,
|
||||
const char *content,
|
||||
size_t size);
|
||||
|
||||
|
||||
int pocl_cache_device_cachedir_exists(cl_program program,
|
||||
unsigned device_i);
|
||||
|
||||
int pocl_cache_write_descriptor(cl_program program,
|
||||
unsigned device_i,
|
||||
const char* kernel_name,
|
||||
const char* content,
|
||||
size_t size);
|
||||
|
||||
void pocl_cache_kernel_cachedir_path (char *kernel_cachedir_path,
|
||||
cl_program program, unsigned device_i,
|
||||
cl_kernel kernel, const char *append_str,
|
||||
_cl_command_node *command,
|
||||
int specialize);
|
||||
|
||||
int pocl_cache_write_kernel_parallel_bc (void *bc, cl_program program,
|
||||
int device_i, cl_kernel kernel,
|
||||
_cl_command_node *command,
|
||||
int specialize);
|
||||
|
||||
// required by pocl_binary.c
|
||||
|
||||
void pocl_cache_program_path (char *path, cl_program program,
|
||||
unsigned device_i);
|
||||
|
||||
void pocl_cache_kernel_cachedir (char *kernel_cachedir_path,
|
||||
cl_program program, unsigned device_i,
|
||||
const char *kernel_name);
|
||||
|
||||
// these two required by llvm API
|
||||
|
||||
void pocl_cache_program_bc_path(char* program_bc_path,
|
||||
cl_program program,
|
||||
unsigned device_i);
|
||||
|
||||
void pocl_cache_work_group_function_path (char *parallel_bc_path,
|
||||
cl_program program,
|
||||
unsigned device_i, cl_kernel kernel,
|
||||
_cl_command_node *command,
|
||||
int specialize);
|
||||
|
||||
void pocl_cache_final_binary_path (char *final_binary_path, cl_program program,
|
||||
unsigned device_i, cl_kernel kernel,
|
||||
_cl_command_node *command, int specialize);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC visibility pop
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
|
@ -1,222 +0,0 @@
|
|||
|
||||
/* autogenerated by CMake, but edited by hand to not
|
||||
* stop with #error when the compiler isn't gcc/clang */
|
||||
|
||||
#ifndef POCL_COMPILER_DETECTION_H
|
||||
#define POCL_COMPILER_DETECTION_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
# define POCL_COMPILER_IS_Intel 0
|
||||
# define POCL_COMPILER_IS_PathScale 0
|
||||
# define POCL_COMPILER_IS_Embarcadero 0
|
||||
# define POCL_COMPILER_IS_Borland 0
|
||||
# define POCL_COMPILER_IS_Watcom 0
|
||||
# define POCL_COMPILER_IS_OpenWatcom 0
|
||||
# define POCL_COMPILER_IS_SunPro 0
|
||||
# define POCL_COMPILER_IS_HP 0
|
||||
# define POCL_COMPILER_IS_Compaq 0
|
||||
# define POCL_COMPILER_IS_zOS 0
|
||||
# define POCL_COMPILER_IS_XL 0
|
||||
# define POCL_COMPILER_IS_VisualAge 0
|
||||
# define POCL_COMPILER_IS_PGI 0
|
||||
# define POCL_COMPILER_IS_Cray 0
|
||||
# define POCL_COMPILER_IS_TI 0
|
||||
# define POCL_COMPILER_IS_Fujitsu 0
|
||||
# define POCL_COMPILER_IS_TinyCC 0
|
||||
# define POCL_COMPILER_IS_Bruce 0
|
||||
# define POCL_COMPILER_IS_SCO 0
|
||||
# define POCL_COMPILER_IS_AppleClang 0
|
||||
# define POCL_COMPILER_IS_Clang 0
|
||||
# define POCL_COMPILER_IS_GNU 0
|
||||
# define POCL_COMPILER_IS_MSVC 0
|
||||
# define POCL_COMPILER_IS_ADSP 0
|
||||
# define POCL_COMPILER_IS_IAR 0
|
||||
# define POCL_COMPILER_IS_ARMCC 0
|
||||
# define POCL_COMPILER_IS_SDCC 0
|
||||
# define POCL_COMPILER_IS_MIPSpro 0
|
||||
|
||||
#if defined(__INTEL_COMPILER) || defined(__ICC)
|
||||
# undef POCL_COMPILER_IS_Intel
|
||||
# define POCL_COMPILER_IS_Intel 1
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# undef POCL_COMPILER_IS_PathScale
|
||||
# define POCL_COMPILER_IS_PathScale 1
|
||||
|
||||
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||
# undef POCL_COMPILER_IS_Embarcadero
|
||||
# define POCL_COMPILER_IS_Embarcadero 1
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# undef POCL_COMPILER_IS_Borland
|
||||
# define POCL_COMPILER_IS_Borland 1
|
||||
|
||||
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
||||
# undef POCL_COMPILER_IS_Watcom
|
||||
# define POCL_COMPILER_IS_Watcom 1
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# undef POCL_COMPILER_IS_OpenWatcom
|
||||
# define POCL_COMPILER_IS_OpenWatcom 1
|
||||
|
||||
#elif defined(__SUNPRO_C)
|
||||
# undef POCL_COMPILER_IS_SunPro
|
||||
# define POCL_COMPILER_IS_SunPro 1
|
||||
|
||||
#elif defined(__HP_cc)
|
||||
# undef POCL_COMPILER_IS_HP
|
||||
# define POCL_COMPILER_IS_HP 1
|
||||
|
||||
#elif defined(__DECC)
|
||||
# undef POCL_COMPILER_IS_Compaq
|
||||
# define POCL_COMPILER_IS_Compaq 1
|
||||
|
||||
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
|
||||
# undef POCL_COMPILER_IS_zOS
|
||||
# define POCL_COMPILER_IS_zOS 1
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
|
||||
# undef POCL_COMPILER_IS_XL
|
||||
# define POCL_COMPILER_IS_XL 1
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
|
||||
# undef POCL_COMPILER_IS_VisualAge
|
||||
# define POCL_COMPILER_IS_VisualAge 1
|
||||
|
||||
#elif defined(__PGI)
|
||||
# undef POCL_COMPILER_IS_PGI
|
||||
# define POCL_COMPILER_IS_PGI 1
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# undef POCL_COMPILER_IS_Cray
|
||||
# define POCL_COMPILER_IS_Cray 1
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# undef POCL_COMPILER_IS_TI
|
||||
# define POCL_COMPILER_IS_TI 1
|
||||
|
||||
#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
|
||||
# undef POCL_COMPILER_IS_Fujitsu
|
||||
# define POCL_COMPILER_IS_Fujitsu 1
|
||||
|
||||
#elif defined(__TINYC__)
|
||||
# undef POCL_COMPILER_IS_TinyCC
|
||||
# define POCL_COMPILER_IS_TinyCC 1
|
||||
|
||||
#elif defined(__BCC__)
|
||||
# undef POCL_COMPILER_IS_Bruce
|
||||
# define POCL_COMPILER_IS_Bruce 1
|
||||
|
||||
#elif defined(__SCO_VERSION__)
|
||||
# undef POCL_COMPILER_IS_SCO
|
||||
# define POCL_COMPILER_IS_SCO 1
|
||||
|
||||
#elif defined(__clang__) && defined(__apple_build_version__)
|
||||
# undef POCL_COMPILER_IS_AppleClang
|
||||
# define POCL_COMPILER_IS_AppleClang 1
|
||||
|
||||
#elif defined(__clang__)
|
||||
# undef POCL_COMPILER_IS_Clang
|
||||
# define POCL_COMPILER_IS_Clang 1
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# undef POCL_COMPILER_IS_GNU
|
||||
# define POCL_COMPILER_IS_GNU 1
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# undef POCL_COMPILER_IS_MSVC
|
||||
# define POCL_COMPILER_IS_MSVC 1
|
||||
|
||||
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||
# undef POCL_COMPILER_IS_ADSP
|
||||
# define POCL_COMPILER_IS_ADSP 1
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)
|
||||
# undef POCL_COMPILER_IS_IAR
|
||||
# define POCL_COMPILER_IS_IAR 1
|
||||
|
||||
#elif defined(__ARMCC_VERSION)
|
||||
# undef POCL_COMPILER_IS_ARMCC
|
||||
# define POCL_COMPILER_IS_ARMCC 1
|
||||
|
||||
#elif defined(SDCC)
|
||||
# undef POCL_COMPILER_IS_SDCC
|
||||
# define POCL_COMPILER_IS_SDCC 1
|
||||
|
||||
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
|
||||
# undef POCL_COMPILER_IS_MIPSpro
|
||||
# define POCL_COMPILER_IS_MIPSpro 1
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
# if POCL_COMPILER_IS_GNU
|
||||
|
||||
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404
|
||||
# define POCL_COMPILER_C_FUNCTION_PROTOTYPES 1
|
||||
# else
|
||||
# define POCL_COMPILER_C_FUNCTION_PROTOTYPES 0
|
||||
# endif
|
||||
|
||||
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
# define POCL_COMPILER_C_RESTRICT 1
|
||||
# else
|
||||
# define POCL_COMPILER_C_RESTRICT 0
|
||||
# endif
|
||||
|
||||
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L
|
||||
# define POCL_COMPILER_C_STATIC_ASSERT 1
|
||||
# else
|
||||
# define POCL_COMPILER_C_STATIC_ASSERT 0
|
||||
# endif
|
||||
|
||||
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
# define POCL_COMPILER_C_VARIADIC_MACROS 1
|
||||
# else
|
||||
# define POCL_COMPILER_C_VARIADIC_MACROS 0
|
||||
# endif
|
||||
|
||||
# elif POCL_COMPILER_IS_Clang
|
||||
|
||||
# if ((__clang_major__ * 100) + __clang_minor__) >= 304
|
||||
# define POCL_COMPILER_C_FUNCTION_PROTOTYPES 1
|
||||
# else
|
||||
# define POCL_COMPILER_C_FUNCTION_PROTOTYPES 0
|
||||
# endif
|
||||
|
||||
# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
# define POCL_COMPILER_C_RESTRICT 1
|
||||
# else
|
||||
# define POCL_COMPILER_C_RESTRICT 0
|
||||
# endif
|
||||
|
||||
# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
||||
# define POCL_COMPILER_C_STATIC_ASSERT 1
|
||||
# else
|
||||
# define POCL_COMPILER_C_STATIC_ASSERT 0
|
||||
# endif
|
||||
|
||||
# if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
# define POCL_COMPILER_C_VARIADIC_MACROS 1
|
||||
# else
|
||||
# define POCL_COMPILER_C_VARIADIC_MACROS 0
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# define POCL_COMPILER_C_FUNCTION_PROTOTYPES 0
|
||||
# define POCL_COMPILER_C_RESTRICT 0
|
||||
# define POCL_COMPILER_C_STATIC_ASSERT 0
|
||||
# define POCL_COMPILER_C_VARIADIC_MACROS 0
|
||||
|
||||
# endif
|
||||
|
||||
# if POCL_COMPILER_C_RESTRICT
|
||||
# define POCL_RESTRICT restrict
|
||||
# else
|
||||
# define POCL_RESTRICT
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,86 +0,0 @@
|
|||
/* pocl_context.h - The 32b and 64b versions of the "context struct" that can be
|
||||
passed as a hidden kernel argument for kernels to fetch their WG/WI ID and
|
||||
dimension data.
|
||||
|
||||
Copyright (c) 2018 Pekka Jääskeläinen / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* This header can be included both from device and host sources. */
|
||||
|
||||
#ifndef POCL_CONTEXT_H
|
||||
#define POCL_CONTEXT_H
|
||||
|
||||
#include "pocl_types.h"
|
||||
|
||||
struct pocl_context {
|
||||
#if __INTPTR_WIDTH__ == 64
|
||||
ulong num_groups[3];
|
||||
ulong global_offset[3];
|
||||
ulong local_size[3];
|
||||
#elif __INTPTR_WIDTH__ == 32
|
||||
uint num_groups[3];
|
||||
uint global_offset[3];
|
||||
uint local_size[3];
|
||||
#else
|
||||
#error unsupported architecture
|
||||
#endif
|
||||
uchar *printf_buffer;
|
||||
uint *printf_buffer_position;
|
||||
uint printf_buffer_capacity;
|
||||
uint work_dim;
|
||||
};
|
||||
|
||||
struct pocl_context32 {
|
||||
uint num_groups[3];
|
||||
uint global_offset[3];
|
||||
uint local_size[3];
|
||||
uchar *printf_buffer;
|
||||
uint *printf_buffer_position;
|
||||
uint printf_buffer_capacity;
|
||||
uint work_dim;
|
||||
};
|
||||
|
||||
/* Copy a 64b context struct to a 32b one. */
|
||||
#define POCL_CONTEXT_COPY64TO32(__DST, __SRC) \
|
||||
do { \
|
||||
struct pocl_context *__src = (struct pocl_context *)__SRC; \
|
||||
struct pocl_context32 *__dst = (struct pocl_context32 *)__DST; \
|
||||
__dst->work_dim = __src->work_dim; \
|
||||
__dst->num_groups[0] = __src->num_groups[0]; \
|
||||
__dst->num_groups[1] = __src->num_groups[1]; \
|
||||
__dst->num_groups[2] = __src->num_groups[2]; \
|
||||
__dst->global_offset[0] = __src->global_offset[0]; \
|
||||
__dst->global_offset[1] = __src->global_offset[1]; \
|
||||
__dst->global_offset[2] = __src->global_offset[2]; \
|
||||
__dst->local_size[0] = __src->local_size[0]; \
|
||||
__dst->local_size[1] = __src->local_size[1]; \
|
||||
__dst->local_size[2] = __src->local_size[2]; \
|
||||
__dst->printf_buffer = __src->printf_buffer; \
|
||||
__dst->printf_buffer_position = __src->printf_buffer_position; \
|
||||
__dst->printf_buffer_capacity = __src->printf_buffer_capacity; \
|
||||
} while (0)
|
||||
|
||||
#define POCL_CONTEXT_SIZE(__BITNESS) \
|
||||
(__BITNESS == 64 ? \
|
||||
sizeof (struct pocl_context) : \
|
||||
sizeof (struct pocl_context32))
|
||||
|
||||
#endif
|
|
@ -1,80 +0,0 @@
|
|||
/* pocl_device.h - global pocl declarations to be used in the device binaries in
|
||||
case applicable by the target
|
||||
|
||||
Copyright (c) 2012-2018 Pekka Jääskeläinen / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef POCL_DEVICE_H
|
||||
#define POCL_DEVICE_H
|
||||
|
||||
#include "pocl_types.h"
|
||||
|
||||
#define MAX_KERNEL_ARGS 64
|
||||
#define MAX_KERNEL_NAME_LENGTH 64
|
||||
|
||||
/* Metadata of a single kernel stored in the device.*/
|
||||
typedef struct {
|
||||
const uchar name[MAX_KERNEL_NAME_LENGTH];
|
||||
ushort num_args;
|
||||
ushort num_locals;
|
||||
void *work_group_func;
|
||||
} __kernel_metadata;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define ALIGN4(x) __declspec(align(4)) x
|
||||
#define ALIGN8(x) __declspec(align(4)) x
|
||||
#else
|
||||
#define ALIGN4(x) x __attribute__ ((aligned (4)))
|
||||
#define ALIGN8(x) x __attribute__ ((aligned (8)))
|
||||
#endif
|
||||
|
||||
/* A kernel invocation command. */
|
||||
typedef struct {
|
||||
/* The execution status of this queue slot. */
|
||||
ALIGN8(uint status);
|
||||
/* The kernel to execute. Points to the metadata in the device global
|
||||
memory. It will be casted to a __kernel_metadata* */
|
||||
ALIGN8(uint kernel);
|
||||
/* Pointers to the kernel arguments in the global memory. Will be
|
||||
casted to 32 bit void* */
|
||||
ALIGN8(uint args[MAX_KERNEL_ARGS]);
|
||||
/* Sizes of the dynamically allocated local buffers. */
|
||||
/* uint32_t dynamic_local_arg_sizes[MAX_KERNEL_ARGS] ALIGN4; */
|
||||
/* Number of dimensions in the work space. */
|
||||
ALIGN4(uint work_dim);
|
||||
ALIGN4(uint num_groups[3]);
|
||||
ALIGN4(uint global_offset[3]);
|
||||
} __kernel_exec_cmd;
|
||||
|
||||
/* Kernel execution statuses. */
|
||||
|
||||
/* The invocation entry is free to use. */
|
||||
#define POCL_KST_FREE 1
|
||||
/* The kernel structure has been populated and is waiting to be
|
||||
executed. */
|
||||
#define POCL_KST_READY 2
|
||||
/* The kernel is currently running in the device. */
|
||||
#define POCL_KST_RUNNING 3
|
||||
/* The kernel has finished execution. The results can be collected and the
|
||||
execution entry be freed (by writing POCL_KST_FREE to the status). */
|
||||
#define POCL_KST_FINISHED 4
|
||||
|
||||
#endif
|
|
@ -1,83 +0,0 @@
|
|||
/* pocl_file_util.h: global declarations of portable file utility functions
|
||||
defined in lib/llvmopencl, due to using llvm::sys::fs & other llvm APIs
|
||||
|
||||
Copyright (c) 2015 pocl developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef POCL_FILE_UTIL_H
|
||||
#define POCL_FILE_UTIL_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC visibility push(hidden)
|
||||
#endif
|
||||
|
||||
/* Remove a directory, recursively */
|
||||
int pocl_rm_rf(const char* path);
|
||||
|
||||
/* Make a directory, including all directories along path */
|
||||
int pocl_mkdir_p(const char* path);
|
||||
|
||||
/* Remove a file or empty directory */
|
||||
int pocl_remove(const char* path);
|
||||
|
||||
int pocl_rename(const char *oldpath, const char *newpath);
|
||||
|
||||
int pocl_exists(const char* path);
|
||||
|
||||
/* Touch file to change last modified time. For portability, this
|
||||
* removes & creates the file. */
|
||||
int pocl_touch_file(const char* path);
|
||||
|
||||
/* Writes or appends data to a file. */
|
||||
int pocl_write_file(const char* path, const char* content,
|
||||
uint64_t count, int append, int dont_rewrite);
|
||||
|
||||
int pocl_write_tempfile (char *output_path, const char *prefix,
|
||||
const char *suffix, const char *content,
|
||||
uint64_t count, int *ret_fd);
|
||||
|
||||
/* Allocates memory and places file contents in it.
|
||||
* Returns negative errno on error, zero otherwise. */
|
||||
int pocl_read_file(const char* path, char** content, uint64_t *filesize);
|
||||
|
||||
int pocl_write_module(void *module, const char* path, int dont_rewrite);
|
||||
|
||||
int pocl_mk_tempdir (char *output, const char *prefix);
|
||||
|
||||
int pocl_mk_tempname (char *output, const char *prefix, const char *suffix,
|
||||
int *ret_fd);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC visibility pop
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
|
@ -1,52 +0,0 @@
|
|||
/* pocl_image_types.h - image data structure used by device implementations
|
||||
|
||||
Copyright (c) 2013 Ville Korhonen
|
||||
Copyright (c) 2017 Michal Babej / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __X86_IMAGE_H__
|
||||
#define __X86_IMAGE_H__
|
||||
|
||||
#ifdef __CBUILD__
|
||||
#define INTTYPE cl_int
|
||||
#else
|
||||
#define INTTYPE int
|
||||
#endif
|
||||
|
||||
typedef uintptr_t dev_sampler_t;
|
||||
|
||||
typedef struct dev_image_t {
|
||||
void *_data;
|
||||
INTTYPE _width;
|
||||
INTTYPE _height;
|
||||
INTTYPE _depth;
|
||||
INTTYPE _image_array_size;
|
||||
INTTYPE _row_pitch;
|
||||
INTTYPE _slice_pitch;
|
||||
INTTYPE _num_mip_levels; /* maybe not needed */
|
||||
INTTYPE _num_samples; /* maybe not needed */
|
||||
INTTYPE _order;
|
||||
INTTYPE _data_type;
|
||||
INTTYPE _num_channels;
|
||||
INTTYPE _elem_size;
|
||||
} dev_image_t;
|
||||
|
||||
#endif
|
|
@ -1,33 +0,0 @@
|
|||
/* pocl-spir.h - global pocl declarations for the SPIR support.
|
||||
|
||||
Copyright (c) 2018-2019 Pekka Jääskeläinen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef POCL_SPIR_H
|
||||
#define POCL_SPIR_H
|
||||
|
||||
#define SPIR_ADDRESS_SPACE_PRIVATE 0
|
||||
#define SPIR_ADDRESS_SPACE_GLOBAL 1
|
||||
#define SPIR_ADDRESS_SPACE_CONSTANT 2
|
||||
#define SPIR_ADDRESS_SPACE_LOCAL 3
|
||||
#define SPIR_ADDRESS_SPACE_GENERIC 4
|
||||
|
||||
#endif
|
|
@ -1,171 +0,0 @@
|
|||
/* pocl_types.h - The basic OpenCL C device side scalar data types.
|
||||
|
||||
Copyright (c) 2018 Pekka Jääskeläinen / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* This header is designed to be included both from the device and the host.
|
||||
In case compiling OpenCL C sources, __OPENCL_VERSION__ should be set.
|
||||
In case compiling in the host, all but the device-specific types are
|
||||
defined (size_t and others). Devices should avoid including the C
|
||||
stdint.h instead of this one as OpenCL C size_t et al. is allowed to
|
||||
be of different width than when targeting C.
|
||||
|
||||
TODO: replace this header (partially) with Clang's opencl-c.h
|
||||
*/
|
||||
|
||||
#ifndef POCL_DEVICE_TYPES_H
|
||||
#define POCL_DEVICE_TYPES_H
|
||||
|
||||
#ifdef __OPENCL_VERSION__
|
||||
|
||||
#ifdef __USE_CLANG_OPENCL_C_H
|
||||
|
||||
/* Minimal definitions, only the target specific macro overrides,
|
||||
just in case Clang export the C ones which might differ for
|
||||
OpenCL C. */
|
||||
|
||||
#ifdef __INTPTR_TYPE__
|
||||
#undef __INTPTR_TYPE__
|
||||
#endif
|
||||
|
||||
#ifdef __UINTPTR_TYPE__
|
||||
#undef __UINTPTR_TYPE__
|
||||
#endif
|
||||
|
||||
#ifdef __SIZE_TYPE__
|
||||
#undef __SIZE_TYPE__
|
||||
#endif
|
||||
|
||||
#ifdef __SIZE_MAX__
|
||||
#undef __SIZE_MAX__
|
||||
#endif
|
||||
|
||||
#if defined(POCL_DEVICE_ADDRESS_BITS) && POCL_DEVICE_ADDRESS_BITS == 32
|
||||
#define __SIZE_TYPE__ uint
|
||||
#define __SIZE_MAX__ UINT_MAX
|
||||
#else
|
||||
#define __SIZE_TYPE__ ulong
|
||||
#define __SIZE_MAX__ ULONG_MAX
|
||||
#endif
|
||||
|
||||
#define __INTPTR_TYPE__ __SIZE_TYPE__
|
||||
#define __UINTPTR_TYPE__ __INTPTR_TYPE__
|
||||
|
||||
#else
|
||||
|
||||
/* Compiling Device-specific OpenCL C or builtin library C. */
|
||||
|
||||
#if defined cl_khr_fp64 && !defined cl_khr_int64
|
||||
#error "cl_khr_fp64 requires cl_khr_int64"
|
||||
#endif
|
||||
|
||||
/* TODO FIXME We should not use these in OpenCL library's C code at all.
|
||||
* The problem is that 1) these are predefined by glibc, 2) while we can
|
||||
* re-define "ulong", we cannot control the size of "long" at all.
|
||||
* which can lead to "ulong" being 64bit and "long" 32bit, resulting in
|
||||
* mysterious errors and bugs. Therefore OpenCL library's C code should
|
||||
* use the fixed size C types where integer size matters. */
|
||||
|
||||
#ifdef __CBUILD__
|
||||
|
||||
/* Builtin library C code definitions. */
|
||||
|
||||
#define size_t csize_t
|
||||
#define uintptr_t cuintptr_t
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#undef size_t
|
||||
#undef uintptr_t
|
||||
|
||||
typedef uint8_t uchar;
|
||||
typedef uint16_t ushort;
|
||||
typedef uint32_t uint;
|
||||
|
||||
#ifdef cl_khr_int64
|
||||
typedef uint64_t ulong;
|
||||
#else
|
||||
typedef uint32_t ulong;
|
||||
#endif
|
||||
|
||||
#ifndef cl_khr_fp16
|
||||
typedef short half;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* The definitions below intentionally lead to errors if these types
|
||||
are used when they are not available in the language. This prevents
|
||||
accidentally using them if the compiler does not disable these
|
||||
types, but only e.g. defines them with an incorrect size.*/
|
||||
|
||||
#ifndef cl_khr_fp64
|
||||
typedef struct error_undefined_type_double error_undefined_type_double;
|
||||
#define double error_undefined_type_double
|
||||
#endif
|
||||
|
||||
#ifdef __SIZE_TYPE__
|
||||
#undef __SIZE_TYPE__
|
||||
#endif
|
||||
|
||||
#ifdef __SIZE_MAX__
|
||||
#undef __SIZE_MAX__
|
||||
#endif
|
||||
|
||||
#if defined(POCL_DEVICE_ADDRESS_BITS) && POCL_DEVICE_ADDRESS_BITS == 32
|
||||
#define __SIZE_TYPE__ uint
|
||||
#define __SIZE_MAX__ UINT_MAX
|
||||
#else
|
||||
#define __SIZE_TYPE__ ulong
|
||||
#define __SIZE_MAX__ ULONG_MAX
|
||||
#endif
|
||||
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
typedef ptrdiff_t intptr_t;
|
||||
typedef size_t uintptr_t;
|
||||
|
||||
#endif /* #ifdef __USE_CLANG_OPENCL_C_H */
|
||||
|
||||
#else /* #ifdef __OPENCL_VERSION__ */
|
||||
|
||||
/* Including from a host source (runtime API implementation). Introduce
|
||||
the fixed width datatypes, but do not override C's size_t and other
|
||||
target specific datatypes. */
|
||||
|
||||
typedef unsigned char uchar;
|
||||
|
||||
/* FIXME see the above TODO about these types. */
|
||||
|
||||
#if !(defined(_SYS_TYPES_H) && defined(__USE_MISC))
|
||||
/* glibc, when including sys/types.h, typedefs these. */
|
||||
|
||||
typedef unsigned long int ulong;
|
||||
typedef unsigned short int ushort;
|
||||
typedef unsigned int uint;
|
||||
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,45 +0,0 @@
|
|||
/* pocl_context.h - The 32b and 64b versions of the "context struct" that can be
|
||||
passed as a hidden kernel argument for kernels to fetch their WG/WI ID and
|
||||
dimension data.
|
||||
|
||||
Copyright (c) 2018 Pekka Jääskeläinen / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef POCL_WORKGROUP_FUNC_H
|
||||
#define POCL_WORKGROUP_FUNC_H
|
||||
|
||||
#include "pocl_types.h"
|
||||
|
||||
/* The default work-group function prototype as generated by Workgroup.cc. */
|
||||
typedef void (*pocl_workgroup_func) (uchar * /* args */,
|
||||
uchar * /* pocl_context */,
|
||||
ulong /* group_x */,
|
||||
ulong /* group_y */,
|
||||
ulong /* group_z */);
|
||||
|
||||
/* Version for 32b targets with 32b max dimension sizes. */
|
||||
typedef void (*pocl_workgroup_func32) (uchar * /* args */,
|
||||
uchar * /* pocl_context */,
|
||||
uint /* group_x */,
|
||||
uint /* group_y */,
|
||||
uint /* group_z */);
|
||||
|
||||
#endif
|
|
@ -1,164 +0,0 @@
|
|||
/* OpenCL runtime library: poclu - useful utility functions for OpenCL programs
|
||||
|
||||
Copyright (c) 2012 Pekka Jääskeläinen / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef POCLU_H
|
||||
#define POCLU_H
|
||||
|
||||
#include <CL/opencl.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define POCLU_CALL __cdecl
|
||||
#define POCLU_API __declspec(dllexport)
|
||||
#else
|
||||
#define POCLU_CALL
|
||||
#define POCLU_API
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Byte swap functions for endianness swapping between the host
|
||||
* (current CPU) and a target device.
|
||||
*
|
||||
* Queries the target device using the OpenCL API for the endianness
|
||||
* and swaps if it differs from the host's.
|
||||
*/
|
||||
POCLU_API cl_int POCLU_CALL
|
||||
poclu_bswap_cl_int(cl_device_id device, cl_int original);
|
||||
|
||||
POCLU_API cl_half POCLU_CALL
|
||||
poclu_bswap_cl_half(cl_device_id device, cl_half original);
|
||||
|
||||
POCLU_API cl_float POCLU_CALL
|
||||
poclu_bswap_cl_float(cl_device_id device, cl_float original);
|
||||
|
||||
POCLU_API cl_float2 POCLU_CALL
|
||||
poclu_bswap_cl_float2(cl_device_id device, cl_float2 original);
|
||||
|
||||
/* In-place swapping of arrays. */
|
||||
POCLU_API void POCLU_CALL
|
||||
poclu_bswap_cl_int_array(cl_device_id device, cl_int* array, size_t num_elements);
|
||||
|
||||
POCLU_API void POCLU_CALL
|
||||
poclu_bswap_cl_half_array(cl_device_id device, cl_half* array, size_t num_elements);
|
||||
|
||||
POCLU_API void POCLU_CALL
|
||||
poclu_bswap_cl_float_array(cl_device_id device, cl_float* array, size_t num_elements);
|
||||
|
||||
POCLU_API void POCLU_CALL
|
||||
poclu_bswap_cl_float2_array(cl_device_id device, cl_float2* array, size_t num_elements);
|
||||
|
||||
/**
|
||||
* Misc. helper functions for streamlining OpenCL API usage.
|
||||
*/
|
||||
|
||||
/* Create a context in the first platform found. */
|
||||
POCLU_API cl_context POCLU_CALL
|
||||
poclu_create_any_context();
|
||||
|
||||
/* Set up a context, device and queue for platform 0, device 0.
|
||||
* All input parameters must be allocated by caller!
|
||||
* Returns CL_SUCCESS on success, or a descriptive OpenCL error code upon failure.
|
||||
*/
|
||||
POCLU_API cl_int POCLU_CALL poclu_get_any_device2 (cl_context *context,
|
||||
cl_device_id *device,
|
||||
cl_command_queue *queue,
|
||||
cl_platform_id *platform);
|
||||
|
||||
POCLU_API cl_int POCLU_CALL poclu_get_any_device (cl_context *context,
|
||||
cl_device_id *device,
|
||||
cl_command_queue *queue);
|
||||
|
||||
POCLU_API cl_int POCLU_CALL poclu_get_multiple_devices (
|
||||
cl_platform_id *platform, cl_context *context, cl_uint *num_devices,
|
||||
cl_device_id **devices, cl_command_queue **queues);
|
||||
/**
|
||||
* cl_half related helpers.
|
||||
*/
|
||||
POCLU_API cl_half POCLU_CALL
|
||||
poclu_float_to_cl_half(float value);
|
||||
|
||||
POCLU_API float POCLU_CALL
|
||||
poclu_cl_half_to_float(cl_half value);
|
||||
|
||||
/* Read content of file to a malloc'd buffer, which is returned.
|
||||
* Return NULL on errors */
|
||||
POCLU_API char *POCLU_CALL poclu_read_file (const char *filemane);
|
||||
|
||||
POCLU_API char *POCLU_CALL poclu_read_binfile (const char *filename,
|
||||
size_t *len);
|
||||
|
||||
POCLU_API int POCLU_CALL poclu_write_file (const char *filemane, char *content,
|
||||
size_t size);
|
||||
|
||||
int poclu_load_program (cl_context context, cl_device_id device,
|
||||
const char *basename, int spir, int spirv, int poclbin,
|
||||
const char *explicit_binary,
|
||||
const char *extra_build_opts, cl_program *p);
|
||||
|
||||
int poclu_load_program_multidev (cl_context context, cl_device_id *devices,
|
||||
cl_uint num_devices, const char *basename,
|
||||
int spir, int spirv, int poclbin,
|
||||
const char *explicit_binary,
|
||||
const char *extra_build_opts, cl_program *p);
|
||||
|
||||
/* In case cl_err != CL_SUCCESS, prints out the error +
|
||||
* function : line to stderr, and returns 1, otherwise
|
||||
* returns 0
|
||||
*/
|
||||
POCLU_API int POCLU_CALL check_cl_error (cl_int cl_err, int line,
|
||||
const char *func_name);
|
||||
|
||||
#define _POCLU_CHECK_CL_ERROR_INNER(cond, func, line) \
|
||||
do \
|
||||
{ \
|
||||
if (check_cl_error (cond, line, func)) \
|
||||
return (EXIT_FAILURE); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define CHECK_CL_ERROR(cond) _POCLU_CHECK_CL_ERROR_INNER(cond, __PRETTY_FUNCTION__, __LINE__)
|
||||
|
||||
#define CHECK_OPENCL_ERROR_IN(message) _POCLU_CHECK_CL_ERROR_INNER(err, message, __LINE__)
|
||||
|
||||
|
||||
#define TEST_ASSERT(EXP) \
|
||||
do { \
|
||||
if (!(EXP)) { \
|
||||
fprintf(stderr, "Assertion: \n" #EXP "\nfailed on %s:%i\n", \
|
||||
__FILE__, __LINE__); \
|
||||
return EXIT_FAILURE; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define CHECK_CL_ERROR2(err) \
|
||||
if (check_cl_error (err, __LINE__, __PRETTY_FUNCTION__)) \
|
||||
goto ERROR
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,522 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2007-2011, Troy D. Hanson http://uthash.sourceforge.net
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef UTLIST_H
|
||||
#define UTLIST_H
|
||||
|
||||
#define UTLIST_VERSION 1.9.4
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* This file contains macros to manipulate singly and doubly-linked lists.
|
||||
*
|
||||
* 1. LL_ macros: singly-linked lists.
|
||||
* 2. DL_ macros: doubly-linked lists.
|
||||
* 3. CDL_ macros: circular doubly-linked lists.
|
||||
*
|
||||
* To use singly-linked lists, your structure must have a "next" pointer.
|
||||
* To use doubly-linked lists, your structure must "prev" and "next" pointers.
|
||||
* Either way, the pointer to the head of the list must be initialized to NULL.
|
||||
*
|
||||
* ----------------.EXAMPLE -------------------------
|
||||
* struct item {
|
||||
* int id;
|
||||
* struct item *prev, *next;
|
||||
* }
|
||||
*
|
||||
* struct item *list = NULL:
|
||||
*
|
||||
* int main() {
|
||||
* struct item *item;
|
||||
* ... allocate and populate item ...
|
||||
* DL_APPEND(list, item);
|
||||
* }
|
||||
* --------------------------------------------------
|
||||
*
|
||||
* For doubly-linked lists, the append and delete macros are O(1)
|
||||
* For singly-linked lists, append and delete are O(n) but prepend is O(1)
|
||||
* The sort macro is O(n log(n)) for all types of single/double/circular lists.
|
||||
*/
|
||||
|
||||
/* These macros use decltype or the earlier __typeof GNU extension.
|
||||
As decltype is only available in newer compilers (VS2010 or gcc 4.3+
|
||||
when compiling c++ code), this code uses whatever method is needed
|
||||
or, for VS2008 where neither is available, uses casting workarounds. */
|
||||
#ifdef _MSC_VER /* MS compiler */
|
||||
#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */
|
||||
#define LDECLTYPE(x) decltype(x)
|
||||
#else /* VS2008 or older (or VS2010 in C mode) */
|
||||
#define NO_DECLTYPE
|
||||
#define LDECLTYPE(x) char*
|
||||
#endif
|
||||
#else /* GNU, Sun and other compilers */
|
||||
#define LDECLTYPE(x) __typeof(x)
|
||||
#endif
|
||||
|
||||
/* for VS2008 we use some workarounds to get around the lack of decltype,
|
||||
* namely, we always reassign our tmp variable to the list head if we need
|
||||
* to dereference its prev/next pointers, and save/restore the real head.*/
|
||||
#ifdef NO_DECLTYPE
|
||||
#define _SV(elt,list) _tmp = (char*)(list); {char **_alias = (char**)&(list); *_alias = (elt); }
|
||||
#define _NEXT(elt,list) ((char*)((list)->next))
|
||||
#define _NEXTASGN(elt,list,to) { char **_alias = (char**)&((list)->next); *_alias=(char*)(to); }
|
||||
#define _PREV(elt,list) ((char*)((list)->prev))
|
||||
#define _PREVASGN(elt,list,to) { char **_alias = (char**)&((list)->prev); *_alias=(char*)(to); }
|
||||
#define _RS(list) { char **_alias = (char**)&(list); *_alias=_tmp; }
|
||||
#define _CASTASGN(a,b) { char **_alias = (char**)&(a); *_alias=(char*)(b); }
|
||||
#else
|
||||
#define _SV(elt,list)
|
||||
#define _NEXT(elt,list) ((elt)->next)
|
||||
#define _NEXTASGN(elt,list,to) ((elt)->next)=(to)
|
||||
#define _PREV(elt,list) ((elt)->prev)
|
||||
#define _PREVASGN(elt,list,to) ((elt)->prev)=(to)
|
||||
#define _RS(list)
|
||||
#define _CASTASGN(a,b) (a)=(b)
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* The sort macro is an adaptation of Simon Tatham's O(n log(n)) mergesort *
|
||||
* Unwieldy variable names used here to avoid shadowing passed-in variables. *
|
||||
*****************************************************************************/
|
||||
#define LL_SORT(list, cmp) \
|
||||
do { \
|
||||
LDECLTYPE(list) _ls_p; \
|
||||
LDECLTYPE(list) _ls_q; \
|
||||
LDECLTYPE(list) _ls_e; \
|
||||
LDECLTYPE(list) _ls_tail; \
|
||||
LDECLTYPE(list) _ls_oldhead; \
|
||||
LDECLTYPE(list) _tmp; \
|
||||
int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \
|
||||
if (list) { \
|
||||
_ls_insize = 1; \
|
||||
_ls_looping = 1; \
|
||||
while (_ls_looping) { \
|
||||
_CASTASGN(_ls_p,list); \
|
||||
_CASTASGN(_ls_oldhead,list); \
|
||||
list = NULL; \
|
||||
_ls_tail = NULL; \
|
||||
_ls_nmerges = 0; \
|
||||
while (_ls_p) { \
|
||||
_ls_nmerges++; \
|
||||
_ls_q = _ls_p; \
|
||||
_ls_psize = 0; \
|
||||
for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \
|
||||
_ls_psize++; \
|
||||
_SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); \
|
||||
if (!_ls_q) break; \
|
||||
} \
|
||||
_ls_qsize = _ls_insize; \
|
||||
while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \
|
||||
if (_ls_psize == 0) { \
|
||||
_ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
|
||||
} else if (_ls_qsize == 0 || !_ls_q) { \
|
||||
_ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
|
||||
} else if (cmp(_ls_p,_ls_q) <= 0) { \
|
||||
_ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
|
||||
} else { \
|
||||
_ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
|
||||
} \
|
||||
if (_ls_tail) { \
|
||||
_SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e); _RS(list); \
|
||||
} else { \
|
||||
_CASTASGN(list,_ls_e); \
|
||||
} \
|
||||
_ls_tail = _ls_e; \
|
||||
} \
|
||||
_ls_p = _ls_q; \
|
||||
} \
|
||||
_SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL); _RS(list); \
|
||||
if (_ls_nmerges <= 1) { \
|
||||
_ls_looping=0; \
|
||||
} \
|
||||
_ls_insize *= 2; \
|
||||
} \
|
||||
} else _tmp=NULL; /* quiet gcc unused variable warning */ \
|
||||
} while (0)
|
||||
|
||||
#define DL_SORT(list, cmp) \
|
||||
do { \
|
||||
LDECLTYPE(list) _ls_p; \
|
||||
LDECLTYPE(list) _ls_q; \
|
||||
LDECLTYPE(list) _ls_e; \
|
||||
LDECLTYPE(list) _ls_tail; \
|
||||
LDECLTYPE(list) _ls_oldhead; \
|
||||
LDECLTYPE(list) _tmp; \
|
||||
int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \
|
||||
if (list) { \
|
||||
_ls_insize = 1; \
|
||||
_ls_looping = 1; \
|
||||
while (_ls_looping) { \
|
||||
_CASTASGN(_ls_p,list); \
|
||||
_CASTASGN(_ls_oldhead,list); \
|
||||
list = NULL; \
|
||||
_ls_tail = NULL; \
|
||||
_ls_nmerges = 0; \
|
||||
while (_ls_p) { \
|
||||
_ls_nmerges++; \
|
||||
_ls_q = _ls_p; \
|
||||
_ls_psize = 0; \
|
||||
for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \
|
||||
_ls_psize++; \
|
||||
_SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); \
|
||||
if (!_ls_q) break; \
|
||||
} \
|
||||
_ls_qsize = _ls_insize; \
|
||||
while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \
|
||||
if (_ls_psize == 0) { \
|
||||
_ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
|
||||
} else if (_ls_qsize == 0 || !_ls_q) { \
|
||||
_ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
|
||||
} else if (cmp(_ls_p,_ls_q) <= 0) { \
|
||||
_ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
|
||||
} else { \
|
||||
_ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
|
||||
} \
|
||||
if (_ls_tail) { \
|
||||
_SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e); _RS(list); \
|
||||
} else { \
|
||||
_CASTASGN(list,_ls_e); \
|
||||
} \
|
||||
_SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail); _RS(list); \
|
||||
_ls_tail = _ls_e; \
|
||||
} \
|
||||
_ls_p = _ls_q; \
|
||||
} \
|
||||
_CASTASGN(list->prev, _ls_tail); \
|
||||
_SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL); _RS(list); \
|
||||
if (_ls_nmerges <= 1) { \
|
||||
_ls_looping=0; \
|
||||
} \
|
||||
_ls_insize *= 2; \
|
||||
} \
|
||||
} else _tmp=NULL; /* quiet gcc unused variable warning */ \
|
||||
} while (0)
|
||||
|
||||
#define CDL_SORT(list, cmp) \
|
||||
do { \
|
||||
LDECLTYPE(list) _ls_p; \
|
||||
LDECLTYPE(list) _ls_q; \
|
||||
LDECLTYPE(list) _ls_e; \
|
||||
LDECLTYPE(list) _ls_tail; \
|
||||
LDECLTYPE(list) _ls_oldhead; \
|
||||
LDECLTYPE(list) _tmp; \
|
||||
LDECLTYPE(list) _tmp2; \
|
||||
int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \
|
||||
if (list) { \
|
||||
_ls_insize = 1; \
|
||||
_ls_looping = 1; \
|
||||
while (_ls_looping) { \
|
||||
_CASTASGN(_ls_p,list); \
|
||||
_CASTASGN(_ls_oldhead,list); \
|
||||
list = NULL; \
|
||||
_ls_tail = NULL; \
|
||||
_ls_nmerges = 0; \
|
||||
while (_ls_p) { \
|
||||
_ls_nmerges++; \
|
||||
_ls_q = _ls_p; \
|
||||
_ls_psize = 0; \
|
||||
for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \
|
||||
_ls_psize++; \
|
||||
_SV(_ls_q,list); \
|
||||
if (_NEXT(_ls_q,list) == _ls_oldhead) { \
|
||||
_ls_q = NULL; \
|
||||
} else { \
|
||||
_ls_q = _NEXT(_ls_q,list); \
|
||||
} \
|
||||
_RS(list); \
|
||||
if (!_ls_q) break; \
|
||||
} \
|
||||
_ls_qsize = _ls_insize; \
|
||||
while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \
|
||||
if (_ls_psize == 0) { \
|
||||
_ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
|
||||
if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \
|
||||
} else if (_ls_qsize == 0 || !_ls_q) { \
|
||||
_ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
|
||||
if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \
|
||||
} else if (cmp(_ls_p,_ls_q) <= 0) { \
|
||||
_ls_e = _ls_p; _SV(_ls_p,list); _ls_p = _NEXT(_ls_p,list); _RS(list); _ls_psize--; \
|
||||
if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \
|
||||
} else { \
|
||||
_ls_e = _ls_q; _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list); _RS(list); _ls_qsize--; \
|
||||
if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \
|
||||
} \
|
||||
if (_ls_tail) { \
|
||||
_SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e); _RS(list); \
|
||||
} else { \
|
||||
_CASTASGN(list,_ls_e); \
|
||||
} \
|
||||
_SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail); _RS(list); \
|
||||
_ls_tail = _ls_e; \
|
||||
} \
|
||||
_ls_p = _ls_q; \
|
||||
} \
|
||||
_CASTASGN(list->prev,_ls_tail); \
|
||||
_CASTASGN(_tmp2,list); \
|
||||
_SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_tmp2); _RS(list); \
|
||||
if (_ls_nmerges <= 1) { \
|
||||
_ls_looping=0; \
|
||||
} \
|
||||
_ls_insize *= 2; \
|
||||
} \
|
||||
} else _tmp=NULL; /* quiet gcc unused variable warning */ \
|
||||
} while (0)
|
||||
|
||||
/******************************************************************************
|
||||
* singly linked list macros (non-circular) *
|
||||
*****************************************************************************/
|
||||
#define LL_PREPEND(head,add) \
|
||||
do { \
|
||||
(add)->next = head; \
|
||||
head = add; \
|
||||
} while (0)
|
||||
|
||||
#define LL_CONCAT(head1,head2) \
|
||||
do { \
|
||||
LDECLTYPE(head1) _tmp; \
|
||||
if (head1) { \
|
||||
_tmp = head1; \
|
||||
while (_tmp->next) { _tmp = _tmp->next; } \
|
||||
_tmp->next=(head2); \
|
||||
} else { \
|
||||
(head1)=(head2); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define LL_APPEND(head,add) \
|
||||
do { \
|
||||
LDECLTYPE(head) _tmp; \
|
||||
(add)->next=NULL; \
|
||||
if (head) { \
|
||||
_tmp = head; \
|
||||
while (_tmp->next) { _tmp = _tmp->next; } \
|
||||
_tmp->next=(add); \
|
||||
} else { \
|
||||
(head)=(add); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define LL_DELETE(head,del) \
|
||||
do { \
|
||||
LDECLTYPE(head) _tmp; \
|
||||
if ((head) == (del)) { \
|
||||
(head)=(head)->next; \
|
||||
} else { \
|
||||
_tmp = head; \
|
||||
while (_tmp->next && (_tmp->next != (del))) { \
|
||||
_tmp = _tmp->next; \
|
||||
} \
|
||||
if (_tmp->next) { \
|
||||
_tmp->next = ((del)->next); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Here are VS2008 replacements for LL_APPEND and LL_DELETE */
|
||||
#define LL_APPEND_VS2008(head,add) \
|
||||
do { \
|
||||
if (head) { \
|
||||
(add)->next = head; /* use add->next as a temp variable */ \
|
||||
while ((add)->next->next) { (add)->next = (add)->next->next; } \
|
||||
(add)->next->next=(add); \
|
||||
} else { \
|
||||
(head)=(add); \
|
||||
} \
|
||||
(add)->next=NULL; \
|
||||
} while (0)
|
||||
|
||||
#define LL_DELETE_VS2008(head,del) \
|
||||
do { \
|
||||
if ((head) == (del)) { \
|
||||
(head)=(head)->next; \
|
||||
} else { \
|
||||
char *_tmp = (char*)(head); \
|
||||
while (head->next && (head->next != (del))) { \
|
||||
head = head->next; \
|
||||
} \
|
||||
if (head->next) { \
|
||||
head->next = ((del)->next); \
|
||||
} \
|
||||
{ \
|
||||
char **_head_alias = (char**)&(head); \
|
||||
*_head_alias = _tmp; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
#ifdef NO_DECLTYPE
|
||||
#undef LL_APPEND
|
||||
#define LL_APPEND LL_APPEND_VS2008
|
||||
#undef LL_DELETE
|
||||
#define LL_DELETE LL_DELETE_VS2008
|
||||
#undef LL_CONCAT /* no LL_CONCAT_VS2008 */
|
||||
#undef DL_CONCAT /* no DL_CONCAT_VS2008 */
|
||||
#endif
|
||||
/* end VS2008 replacements */
|
||||
|
||||
#define LL_FOREACH(head,el) \
|
||||
for(el=head;el;el=el->next)
|
||||
|
||||
#define LL_FOREACH_SAFE(head,el,tmp) \
|
||||
for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
|
||||
|
||||
#define LL_SEARCH_SCALAR(head,out,field,val) \
|
||||
do { \
|
||||
LL_FOREACH(head,out) { \
|
||||
if ((out)->field == (val)) break; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define LL_SEARCH(head,out,elt,cmp) \
|
||||
do { \
|
||||
LL_FOREACH(head,out) { \
|
||||
if ((cmp(out,elt))==0) break; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/******************************************************************************
|
||||
* doubly linked list macros (non-circular) *
|
||||
*****************************************************************************/
|
||||
#define DL_PREPEND(head,add) \
|
||||
do { \
|
||||
(add)->next = head; \
|
||||
if (head) { \
|
||||
(add)->prev = (head)->prev; \
|
||||
(head)->prev = (add); \
|
||||
} else { \
|
||||
(add)->prev = (add); \
|
||||
} \
|
||||
(head) = (add); \
|
||||
} while (0)
|
||||
|
||||
#define DL_APPEND(head,add) \
|
||||
do { \
|
||||
if (head) { \
|
||||
(add)->prev = (head)->prev; \
|
||||
(head)->prev->next = (add); \
|
||||
(head)->prev = (add); \
|
||||
(add)->next = NULL; \
|
||||
} else { \
|
||||
(head)=(add); \
|
||||
(head)->prev = (head); \
|
||||
(head)->next = NULL; \
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
#define DL_CONCAT(head1,head2) \
|
||||
do { \
|
||||
LDECLTYPE(head1) _tmp; \
|
||||
if (head2) { \
|
||||
if (head1) { \
|
||||
_tmp = (head2)->prev; \
|
||||
(head2)->prev = (head1)->prev; \
|
||||
(head1)->prev->next = (head2); \
|
||||
(head1)->prev = _tmp; \
|
||||
} else { \
|
||||
(head1)=(head2); \
|
||||
} \
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
#define DL_DELETE(head,del) \
|
||||
do { \
|
||||
assert((del)->prev != NULL); \
|
||||
if ((del)->prev == (del)) { \
|
||||
(head)=NULL; \
|
||||
} else if ((del)==(head)) { \
|
||||
(del)->next->prev = (del)->prev; \
|
||||
(head) = (del)->next; \
|
||||
} else { \
|
||||
(del)->prev->next = (del)->next; \
|
||||
if ((del)->next) { \
|
||||
(del)->next->prev = (del)->prev; \
|
||||
} else { \
|
||||
(head)->prev = (del)->prev; \
|
||||
} \
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
|
||||
#define DL_FOREACH(head,el) \
|
||||
for(el=head;el;el=el->next)
|
||||
|
||||
/* this version is safe for deleting the elements during iteration */
|
||||
#define DL_FOREACH_SAFE(head,el,tmp) \
|
||||
for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
|
||||
|
||||
/* these are identical to their singly-linked list counterparts */
|
||||
#define DL_SEARCH_SCALAR LL_SEARCH_SCALAR
|
||||
#define DL_SEARCH LL_SEARCH
|
||||
|
||||
/******************************************************************************
|
||||
* circular doubly linked list macros *
|
||||
*****************************************************************************/
|
||||
#define CDL_PREPEND(head,add) \
|
||||
do { \
|
||||
if (head) { \
|
||||
(add)->prev = (head)->prev; \
|
||||
(add)->next = (head); \
|
||||
(head)->prev = (add); \
|
||||
(add)->prev->next = (add); \
|
||||
} else { \
|
||||
(add)->prev = (add); \
|
||||
(add)->next = (add); \
|
||||
} \
|
||||
(head)=(add); \
|
||||
} while (0)
|
||||
|
||||
#define CDL_DELETE(head,del) \
|
||||
do { \
|
||||
if ( ((head)==(del)) && ((head)->next == (head))) { \
|
||||
(head) = 0L; \
|
||||
} else { \
|
||||
(del)->next->prev = (del)->prev; \
|
||||
(del)->prev->next = (del)->next; \
|
||||
if ((del) == (head)) (head)=(del)->next; \
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
#define CDL_FOREACH(head,el) \
|
||||
for(el=head;el;el=(el->next==head ? 0L : el->next))
|
||||
|
||||
#define CDL_FOREACH_SAFE(head,el,tmp1,tmp2) \
|
||||
for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL); \
|
||||
(el) && ((tmp2)=(el)->next, 1); \
|
||||
((el) = (((el)==(tmp1)) ? 0L : (tmp2))))
|
||||
|
||||
#define CDL_SEARCH_SCALAR(head,out,field,val) \
|
||||
do { \
|
||||
CDL_FOREACH(head,out) { \
|
||||
if ((out)->field == (val)) break; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define CDL_SEARCH(head,out,elt,cmp) \
|
||||
do { \
|
||||
CDL_FOREACH(head,out) { \
|
||||
if ((cmp(out,elt))==0) break; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#endif /* UTLIST_H */
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
/* pocl/include/vccompat.h - Compatibility header to provide some functions
|
||||
which are not found from VC++.
|
||||
|
||||
All functions should be static inline so that they can be included in many places
|
||||
without having problem of symbol collision.
|
||||
|
||||
Copyright (c) 2014 Mikael Lepistö <elhigu@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef VCCOMPAT_HPP
|
||||
#define VCCOMPAT_HPP
|
||||
|
||||
#include <Windows.h>
|
||||
#define __restrict__ __restrict
|
||||
#define restrict __restrict
|
||||
|
||||
#include <intrin.h>
|
||||
#define __builtin_popcount __popcnt
|
||||
|
||||
// ERROR is used as label for goto in some OCL API functions
|
||||
#undef ERROR
|
||||
|
||||
// if this causes linking problems, use inline function below...
|
||||
#define snprintf _snprintf
|
||||
|
||||
/*
|
||||
static inline int snprintf(char *str, size_t size, const char *format, ...) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
_snprintf(str, size, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
*/
|
||||
|
||||
static inline char* strtok_r(char *str, const char *delim, char **saveptr) {
|
||||
return strtok_s(str, delim, saveptr);
|
||||
}
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
|
||||
#define srand48(x) srand(x)
|
||||
#define drand48() (double(rand()) / RAND_MAX)
|
||||
|
||||
#include <sys/utime.h>
|
||||
#define utime _utime;
|
||||
|
||||
#define RTLD_NOW 1
|
||||
#define RTLD_LOCAL 1
|
||||
|
||||
/**
|
||||
* dl compatibility functions
|
||||
*/
|
||||
|
||||
static inline void* dlopen(const char* filename, int flags) {
|
||||
return (void*)LoadLibrary(filename);
|
||||
}
|
||||
|
||||
static inline int dlerror(void) {
|
||||
return GetLastError();
|
||||
}
|
||||
|
||||
static inline void *dlsym(void* handle, const char *symbol) {
|
||||
return GetProcAddress((HMODULE)handle, symbol);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filesystem stuff
|
||||
*/
|
||||
#include <io.h>
|
||||
#define R_OK 4 /* Test for read permission. */
|
||||
#define W_OK 2 /* Test for write permission. */
|
||||
#define F_OK 0 /* Test for existence. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <direct.h>
|
||||
#include <process.h>
|
||||
|
||||
#define mkdir(a,b) mkdir(a)
|
||||
|
||||
/**
|
||||
* TODO: test these implementations...
|
||||
*/
|
||||
|
||||
/* Commented out: unused, and actually incorrect/unsafe.
|
||||
static inline void gen_random(char *s, const int len) {
|
||||
static const char alphanum[] =
|
||||
"0123456789"
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
"abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
for (int i = 0; i < len; ++i) {
|
||||
s[i] = alphanum[rand() % (sizeof(alphanum)-1)];
|
||||
}
|
||||
s[len] = 0;
|
||||
}
|
||||
|
||||
static inline void mkdtemp(char *temp) {
|
||||
int rnd_start = strlen(temp) - 6;
|
||||
gen_random(&temp[rnd_start], 6);
|
||||
mkdir(temp);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Memory allocation functions
|
||||
*/
|
||||
#include <malloc.h>
|
||||
|
||||
static int posix_memalign(void **p, size_t align, size_t size) {
|
||||
void *buf = _aligned_malloc(size, align);
|
||||
if (buf == NULL) return errno;
|
||||
*p = buf;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define alloca _alloca
|
||||
|
||||
#endif
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,420 +0,0 @@
|
|||
In archive libvecadd.a:
|
||||
|
||||
tempfile-56-19-33-68-f2.o: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <__cxx_global_var_init>:
|
||||
0: ff010113 addi sp,sp,-16
|
||||
4: 00112623 sw ra,12(sp)
|
||||
8: 00812423 sw s0,8(sp)
|
||||
c: 01010413 addi s0,sp,16
|
||||
10: 00000537 lui a0,0x0
|
||||
14: 00050513 mv a0,a0
|
||||
18: 00000097 auipc ra,0x0
|
||||
1c: 000080e7 jalr ra # 18 <__cxx_global_var_init+0x18>
|
||||
20: 00812403 lw s0,8(sp)
|
||||
24: 00c12083 lw ra,12(sp)
|
||||
28: 01010113 addi sp,sp,16
|
||||
2c: 00008067 ret
|
||||
|
||||
00000030 <_ZN12_GLOBAL__N_122auto_register_kernel_tC2Ev>:
|
||||
30: ff010113 addi sp,sp,-16
|
||||
34: 00112623 sw ra,12(sp)
|
||||
38: 00812423 sw s0,8(sp)
|
||||
3c: 01010413 addi s0,sp,16
|
||||
40: fea42a23 sw a0,-12(s0)
|
||||
44: 00000537 lui a0,0x0
|
||||
48: 00050513 mv a0,a0
|
||||
4c: 000005b7 lui a1,0x0
|
||||
50: 00058593 mv a1,a1
|
||||
54: 00000637 lui a2,0x0
|
||||
58: 00060713 mv a4,a2
|
||||
5c: 00000637 lui a2,0x0
|
||||
60: 00060793 mv a5,a2
|
||||
64: 00300613 li a2,3
|
||||
68: 00000693 li a3,0
|
||||
6c: 00000097 auipc ra,0x0
|
||||
70: 000080e7 jalr ra # 6c <_ZN12_GLOBAL__N_122auto_register_kernel_tC2Ev+0x3c>
|
||||
74: 00812403 lw s0,8(sp)
|
||||
78: 00c12083 lw ra,12(sp)
|
||||
7c: 01010113 addi sp,sp,16
|
||||
80: 00008067 ret
|
||||
|
||||
00000084 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc>:
|
||||
84: ff010113 addi sp,sp,-16
|
||||
88: 00112623 sw ra,12(sp)
|
||||
8c: 00812423 sw s0,8(sp)
|
||||
90: 01010413 addi s0,sp,16
|
||||
94: 00000097 auipc ra,0x0
|
||||
98: 000080e7 jalr ra # 94 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0x10>
|
||||
9c: 00812403 lw s0,8(sp)
|
||||
a0: 00c12083 lw ra,12(sp)
|
||||
a4: 01010113 addi sp,sp,16
|
||||
a8: 00008067 ret
|
||||
|
||||
Disassembly of section .sbss:
|
||||
|
||||
00000000 <_ZN12_GLOBAL__N_15__x__E>:
|
||||
...
|
||||
|
||||
Disassembly of section .sdata:
|
||||
|
||||
00000000 <_ZZN12_GLOBAL__N_122auto_register_kernel_tC1EvE9arg_types>:
|
||||
0: 0101 addi sp,sp,0
|
||||
2: 01 Address 0x0000000000000002 is out of bounds.
|
||||
|
||||
|
||||
Disassembly of section .bss:
|
||||
|
||||
00000000 <_ZZN12_GLOBAL__N_122auto_register_kernel_tC1EvE11local_sizes>:
|
||||
...
|
||||
|
||||
Disassembly of section .rodata.str1.1:
|
||||
|
||||
00000000 <.L.str>:
|
||||
0: 6576 flw fa0,92(sp)
|
||||
2: 64646163 bltu s0,t1,644 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0x5c0>
|
||||
...
|
||||
|
||||
Disassembly of section .init_array:
|
||||
|
||||
00000000 <.init_array>:
|
||||
0: 0000 unimp
|
||||
...
|
||||
|
||||
Disassembly of section .comment:
|
||||
|
||||
00000000 <.comment>:
|
||||
0: 6300 flw fs0,0(a4)
|
||||
2: 616c flw fa1,68(a0)
|
||||
4: 676e flw fa4,216(sp)
|
||||
6: 7620 flw fs0,104(a2)
|
||||
8: 7265 lui tp,0xffff9
|
||||
a: 6e6f6973 csrrsi s2,0x6e6,30
|
||||
e: 3920 fld fs0,112(a0)
|
||||
10: 302e fld ft0,232(sp)
|
||||
12: 312e fld ft2,232(sp)
|
||||
14: 2820 fld fs0,80(s0)
|
||||
16: 7468 flw fa0,108(s0)
|
||||
18: 7074 flw fa3,100(s0)
|
||||
1a: 2f2f3a73 csrrc s4,0x2f2,t5
|
||||
1e: 68746967 0x68746967
|
||||
22: 6275 lui tp,0x1d
|
||||
24: 632e flw ft6,200(sp)
|
||||
26: 6c2f6d6f jal s10,f66e8 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xf6664>
|
||||
2a: 766c flw fa1,108(a2)
|
||||
2c: 2d6d jal 6e6 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0x662>
|
||||
2e: 696d lui s2,0x1b
|
||||
30: 7272 flw ft4,60(sp)
|
||||
32: 632f726f jal tp,f7664 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xf75e0>
|
||||
36: 616c flw fa1,68(a0)
|
||||
38: 676e flw fa4,216(sp)
|
||||
3a: 672e flw fa4,200(sp)
|
||||
3c: 7469 lui s0,0xffffa
|
||||
3e: 6220 flw fs0,64(a2)
|
||||
40: 6465 lui s0,0x19
|
||||
42: 34643733 0x34643733
|
||||
46: 3162 fld ft2,56(sp)
|
||||
48: 6338 flw fa4,64(a4)
|
||||
4a: 3665 jal fffffbf2 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xfffffb6e>
|
||||
4c: 3939 jal fffffc6a <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xfffffbe6>
|
||||
4e: 32636633 0x32636633
|
||||
52: 3635 jal fffffb7e <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xfffffafa>
|
||||
54: 64386537 lui a0,0x64386
|
||||
58: 3665 jal fffffc00 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xfffffb7c>
|
||||
5a: 6631 lui a2,0xc
|
||||
5c: 6236 flw ft4,76(sp)
|
||||
5e: 64663033 0x64663033
|
||||
62: 6330 flw fa2,64(a4)
|
||||
64: 3762 fld fa4,56(sp)
|
||||
66: 2935 jal 4a2 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0x41e>
|
||||
68: 2820 fld fs0,80(s0)
|
||||
6a: 7468 flw fa0,108(s0)
|
||||
6c: 7074 flw fa3,100(s0)
|
||||
6e: 2f2f3a73 csrrc s4,0x2f2,t5
|
||||
72: 68746967 0x68746967
|
||||
76: 6275 lui tp,0x1d
|
||||
78: 632e flw ft6,200(sp)
|
||||
7a: 6c2f6d6f jal s10,f673c <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xf66b8>
|
||||
7e: 766c flw fa1,108(a2)
|
||||
80: 2d6d jal 73a <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0x6b6>
|
||||
82: 696d lui s2,0x1b
|
||||
84: 7272 flw ft4,60(sp)
|
||||
86: 6c2f726f jal tp,f7748 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xf76c4>
|
||||
8a: 766c flw fa1,108(a2)
|
||||
8c: 2e6d jal 446 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0x3c2>
|
||||
8e: 20746967 0x20746967
|
||||
92: 35663263 0x35663263
|
||||
96: 62393033 0x62393033
|
||||
9a: 3132 fld ft2,296(sp)
|
||||
9c: 6336 flw ft6,76(sp)
|
||||
9e: 3062 fld ft0,56(sp)
|
||||
a0: 6132 flw ft2,12(sp)
|
||||
a2: 6130 flw fa2,64(a0)
|
||||
a4: 6561 lui a0,0x18
|
||||
a6: 3731 jal ffffffb2 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xffffff2e>
|
||||
a8: 35333533 0x35333533
|
||||
ac: 3934 fld fa3,112(a0)
|
||||
ae: 3964 fld fs1,240(a0)
|
||||
b0: 3538 fld fa4,104(a0)
|
||||
b2: 3562 fld fa0,56(sp)
|
||||
b4: 3062 fld ft0,56(sp)
|
||||
b6: 3635 jal fffffbe2 <_GLOBAL__sub_I_tempfile_7a_73_15_a5_2b.cc+0xfffffb5e>
|
||||
b8: 00293533 sltu a0,s2,sp
|
||||
|
||||
Disassembly of section .llvm_addrsig:
|
||||
|
||||
00000000 <.llvm_addrsig>:
|
||||
0: 0a08 addi a0,sp,272
|
||||
2: 0309 addi t1,t1,2
|
||||
4: 0705 addi a4,a4,1
|
||||
6: 06 Address 0x0000000000000006 is out of bounds.
|
||||
|
||||
|
||||
tempfile-36-3d-1d-4c-cd.so.o: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <_pocl_kernel_vecadd>:
|
||||
0: fe010113 addi sp,sp,-32
|
||||
4: 00112e23 sw ra,28(sp)
|
||||
8: 00812c23 sw s0,24(sp)
|
||||
c: 00912a23 sw s1,20(sp)
|
||||
10: 01212823 sw s2,16(sp)
|
||||
14: 01312623 sw s3,12(sp)
|
||||
18: 01412423 sw s4,8(sp)
|
||||
1c: 01512223 sw s5,4(sp)
|
||||
20: 02010413 addi s0,sp,32
|
||||
24: ffc17113 andi sp,sp,-4
|
||||
28: 00068913 mv s2,a3
|
||||
2c: 00060993 mv s3,a2
|
||||
30: 00058a13 mv s4,a1
|
||||
34: 00050a93 mv s5,a0
|
||||
38: 0186a483 lw s1,24(a3)
|
||||
3c: 00048513 mv a0,s1
|
||||
40: 00070593 mv a1,a4
|
||||
44: 00000097 auipc ra,0x0
|
||||
48: 000080e7 jalr ra # 44 <_pocl_kernel_vecadd+0x44>
|
||||
4c: 00c92583 lw a1,12(s2)
|
||||
50: 00a58533 add a0,a1,a0
|
||||
54: 00251513 slli a0,a0,0x2
|
||||
58: 00aa82b3 add t0,s5,a0
|
||||
5c: 00aa0333 add t1,s4,a0
|
||||
60: 00a983b3 add t2,s3,a0
|
||||
64: 02092803 lw a6,32(s2)
|
||||
68: 01c92e03 lw t3,28(s2)
|
||||
6c: 00000893 li a7,0
|
||||
70: 00000e93 li t4,0
|
||||
74: 00028513 mv a0,t0
|
||||
78: 00030593 mv a1,t1
|
||||
7c: 00038613 mv a2,t2
|
||||
80: 00000793 li a5,0
|
||||
84: 00052703 lw a4,0(a0)
|
||||
88: 0005a683 lw a3,0(a1)
|
||||
8c: 00e686b3 add a3,a3,a4
|
||||
90: 00d62023 sw a3,0(a2)
|
||||
94: 00450513 addi a0,a0,4
|
||||
98: 00458593 addi a1,a1,4
|
||||
9c: 00460613 addi a2,a2,4
|
||||
a0: 00178793 addi a5,a5,1
|
||||
a4: fe97e0e3 bltu a5,s1,84 <_pocl_kernel_vecadd+0x84>
|
||||
a8: 001e8e93 addi t4,t4,1
|
||||
ac: fdcee4e3 bltu t4,t3,74 <_pocl_kernel_vecadd+0x74>
|
||||
b0: 00188893 addi a7,a7,1
|
||||
b4: fb08eee3 bltu a7,a6,70 <_pocl_kernel_vecadd+0x70>
|
||||
b8: fe040113 addi sp,s0,-32
|
||||
bc: 00412a83 lw s5,4(sp)
|
||||
c0: 00812a03 lw s4,8(sp)
|
||||
c4: 00c12983 lw s3,12(sp)
|
||||
c8: 01012903 lw s2,16(sp)
|
||||
cc: 01412483 lw s1,20(sp)
|
||||
d0: 01812403 lw s0,24(sp)
|
||||
d4: 01c12083 lw ra,28(sp)
|
||||
d8: 02010113 addi sp,sp,32
|
||||
dc: 00008067 ret
|
||||
|
||||
000000e0 <_pocl_kernel_vecadd_workgroup>:
|
||||
e0: ff010113 addi sp,sp,-16
|
||||
e4: 00112623 sw ra,12(sp)
|
||||
e8: 00812423 sw s0,8(sp)
|
||||
ec: 00912223 sw s1,4(sp)
|
||||
f0: 01212023 sw s2,0(sp)
|
||||
f4: 00058493 mv s1,a1
|
||||
f8: 00050913 mv s2,a0
|
||||
fc: 0185a403 lw s0,24(a1)
|
||||
100: 00040513 mv a0,s0
|
||||
104: 00060593 mv a1,a2
|
||||
108: 00000097 auipc ra,0x0
|
||||
10c: 000080e7 jalr ra # 108 <_pocl_kernel_vecadd_workgroup+0x28>
|
||||
110: 00c4a583 lw a1,12(s1)
|
||||
114: 00a58533 add a0,a1,a0
|
||||
118: 00251513 slli a0,a0,0x2
|
||||
11c: 00892583 lw a1,8(s2)
|
||||
120: 0005a583 lw a1,0(a1)
|
||||
124: 00492603 lw a2,4(s2)
|
||||
128: 00062603 lw a2,0(a2)
|
||||
12c: 00092683 lw a3,0(s2)
|
||||
130: 0006a683 lw a3,0(a3)
|
||||
134: 00a682b3 add t0,a3,a0
|
||||
138: 00a60333 add t1,a2,a0
|
||||
13c: 00a583b3 add t2,a1,a0
|
||||
140: 0204a803 lw a6,32(s1)
|
||||
144: 01c4ae03 lw t3,28(s1)
|
||||
148: 00000893 li a7,0
|
||||
14c: 00000493 li s1,0
|
||||
150: 00028513 mv a0,t0
|
||||
154: 00030593 mv a1,t1
|
||||
158: 00038613 mv a2,t2
|
||||
15c: 00000793 li a5,0
|
||||
160: 00052683 lw a3,0(a0)
|
||||
164: 0005a703 lw a4,0(a1)
|
||||
168: 00d706b3 add a3,a4,a3
|
||||
16c: 00d62023 sw a3,0(a2)
|
||||
170: 00450513 addi a0,a0,4
|
||||
174: 00458593 addi a1,a1,4
|
||||
178: 00460613 addi a2,a2,4
|
||||
17c: 00178793 addi a5,a5,1
|
||||
180: fe87e0e3 bltu a5,s0,160 <_pocl_kernel_vecadd_workgroup+0x80>
|
||||
184: 00148493 addi s1,s1,1
|
||||
188: fdc4e4e3 bltu s1,t3,150 <_pocl_kernel_vecadd_workgroup+0x70>
|
||||
18c: 00188893 addi a7,a7,1
|
||||
190: fb08eee3 bltu a7,a6,14c <_pocl_kernel_vecadd_workgroup+0x6c>
|
||||
194: 00012903 lw s2,0(sp)
|
||||
198: 00412483 lw s1,4(sp)
|
||||
19c: 00812403 lw s0,8(sp)
|
||||
1a0: 00c12083 lw ra,12(sp)
|
||||
1a4: 01010113 addi sp,sp,16
|
||||
1a8: 00008067 ret
|
||||
|
||||
000001ac <_pocl_kernel_vecadd_workgroup_fast>:
|
||||
1ac: ff010113 addi sp,sp,-16
|
||||
1b0: 00112623 sw ra,12(sp)
|
||||
1b4: 00812423 sw s0,8(sp)
|
||||
1b8: 00912223 sw s1,4(sp)
|
||||
1bc: 01212023 sw s2,0(sp)
|
||||
1c0: 00058493 mv s1,a1
|
||||
1c4: 00050913 mv s2,a0
|
||||
1c8: 0185a403 lw s0,24(a1)
|
||||
1cc: 00040513 mv a0,s0
|
||||
1d0: 00060593 mv a1,a2
|
||||
1d4: 00000097 auipc ra,0x0
|
||||
1d8: 000080e7 jalr ra # 1d4 <_pocl_kernel_vecadd_workgroup_fast+0x28>
|
||||
1dc: 00c4a583 lw a1,12(s1)
|
||||
1e0: 00a58533 add a0,a1,a0
|
||||
1e4: 00251513 slli a0,a0,0x2
|
||||
1e8: 00892583 lw a1,8(s2)
|
||||
1ec: 00492603 lw a2,4(s2)
|
||||
1f0: 00092683 lw a3,0(s2)
|
||||
1f4: 00a682b3 add t0,a3,a0
|
||||
1f8: 00a60333 add t1,a2,a0
|
||||
1fc: 00a583b3 add t2,a1,a0
|
||||
200: 0204a803 lw a6,32(s1)
|
||||
204: 01c4ae03 lw t3,28(s1)
|
||||
208: 00000893 li a7,0
|
||||
20c: 00000493 li s1,0
|
||||
210: 00028513 mv a0,t0
|
||||
214: 00030593 mv a1,t1
|
||||
218: 00038613 mv a2,t2
|
||||
21c: 00000793 li a5,0
|
||||
220: 00052683 lw a3,0(a0)
|
||||
224: 0005a703 lw a4,0(a1)
|
||||
228: 00d706b3 add a3,a4,a3
|
||||
22c: 00d62023 sw a3,0(a2)
|
||||
230: 00450513 addi a0,a0,4
|
||||
234: 00458593 addi a1,a1,4
|
||||
238: 00460613 addi a2,a2,4
|
||||
23c: 00178793 addi a5,a5,1
|
||||
240: fe87e0e3 bltu a5,s0,220 <_pocl_kernel_vecadd_workgroup_fast+0x74>
|
||||
244: 00148493 addi s1,s1,1
|
||||
248: fdc4e4e3 bltu s1,t3,210 <_pocl_kernel_vecadd_workgroup_fast+0x64>
|
||||
24c: 00188893 addi a7,a7,1
|
||||
250: fb08eee3 bltu a7,a6,20c <_pocl_kernel_vecadd_workgroup_fast+0x60>
|
||||
254: 00012903 lw s2,0(sp)
|
||||
258: 00412483 lw s1,4(sp)
|
||||
25c: 00812403 lw s0,8(sp)
|
||||
260: 00c12083 lw ra,12(sp)
|
||||
264: 01010113 addi sp,sp,16
|
||||
268: 00008067 ret
|
||||
|
||||
Disassembly of section .comment:
|
||||
|
||||
00000000 <.comment>:
|
||||
0: 6300 flw fs0,0(a4)
|
||||
2: 616c flw fa1,68(a0)
|
||||
4: 676e flw fa4,216(sp)
|
||||
6: 7620 flw fs0,104(a2)
|
||||
8: 7265 lui tp,0xffff9
|
||||
a: 6e6f6973 csrrsi s2,0x6e6,30
|
||||
e: 3920 fld fs0,112(a0)
|
||||
10: 302e fld ft0,232(sp)
|
||||
12: 312e fld ft2,232(sp)
|
||||
14: 2820 fld fs0,80(s0)
|
||||
16: 7468 flw fa0,108(s0)
|
||||
18: 7074 flw fa3,100(s0)
|
||||
1a: 2f2f3a73 csrrc s4,0x2f2,t5
|
||||
1e: 68746967 0x68746967
|
||||
22: 6275 lui tp,0x1d
|
||||
24: 632e flw ft6,200(sp)
|
||||
26: 6c2f6d6f jal s10,f66e8 <_pocl_kernel_vecadd_workgroup_fast+0xf653c>
|
||||
2a: 766c flw fa1,108(a2)
|
||||
2c: 2d6d jal 6e6 <_pocl_kernel_vecadd_workgroup_fast+0x53a>
|
||||
2e: 696d lui s2,0x1b
|
||||
30: 7272 flw ft4,60(sp)
|
||||
32: 632f726f jal tp,f7664 <_pocl_kernel_vecadd_workgroup_fast+0xf74b8>
|
||||
36: 616c flw fa1,68(a0)
|
||||
38: 676e flw fa4,216(sp)
|
||||
3a: 672e flw fa4,200(sp)
|
||||
3c: 7469 lui s0,0xffffa
|
||||
3e: 6220 flw fs0,64(a2)
|
||||
40: 6465 lui s0,0x19
|
||||
42: 34643733 0x34643733
|
||||
46: 3162 fld ft2,56(sp)
|
||||
48: 6338 flw fa4,64(a4)
|
||||
4a: 3665 jal fffffbf2 <_pocl_kernel_vecadd_workgroup_fast+0xfffffa46>
|
||||
4c: 3939 jal fffffc6a <_pocl_kernel_vecadd_workgroup_fast+0xfffffabe>
|
||||
4e: 32636633 0x32636633
|
||||
52: 3635 jal fffffb7e <_pocl_kernel_vecadd_workgroup_fast+0xfffff9d2>
|
||||
54: 64386537 lui a0,0x64386
|
||||
58: 3665 jal fffffc00 <_pocl_kernel_vecadd_workgroup_fast+0xfffffa54>
|
||||
5a: 6631 lui a2,0xc
|
||||
5c: 6236 flw ft4,76(sp)
|
||||
5e: 64663033 0x64663033
|
||||
62: 6330 flw fa2,64(a4)
|
||||
64: 3762 fld fa4,56(sp)
|
||||
66: 2935 jal 4a2 <_pocl_kernel_vecadd_workgroup_fast+0x2f6>
|
||||
68: 2820 fld fs0,80(s0)
|
||||
6a: 7468 flw fa0,108(s0)
|
||||
6c: 7074 flw fa3,100(s0)
|
||||
6e: 2f2f3a73 csrrc s4,0x2f2,t5
|
||||
72: 68746967 0x68746967
|
||||
76: 6275 lui tp,0x1d
|
||||
78: 632e flw ft6,200(sp)
|
||||
7a: 6c2f6d6f jal s10,f673c <_pocl_kernel_vecadd_workgroup_fast+0xf6590>
|
||||
7e: 766c flw fa1,108(a2)
|
||||
80: 2d6d jal 73a <_pocl_kernel_vecadd_workgroup_fast+0x58e>
|
||||
82: 696d lui s2,0x1b
|
||||
84: 7272 flw ft4,60(sp)
|
||||
86: 6c2f726f jal tp,f7748 <_pocl_kernel_vecadd_workgroup_fast+0xf759c>
|
||||
8a: 766c flw fa1,108(a2)
|
||||
8c: 2e6d jal 446 <_pocl_kernel_vecadd_workgroup_fast+0x29a>
|
||||
8e: 20746967 0x20746967
|
||||
92: 35663263 0x35663263
|
||||
96: 62393033 0x62393033
|
||||
9a: 3132 fld ft2,296(sp)
|
||||
9c: 6336 flw ft6,76(sp)
|
||||
9e: 3062 fld ft0,56(sp)
|
||||
a0: 6132 flw ft2,12(sp)
|
||||
a2: 6130 flw fa2,64(a0)
|
||||
a4: 6561 lui a0,0x18
|
||||
a6: 3731 jal ffffffb2 <_pocl_kernel_vecadd_workgroup_fast+0xfffffe06>
|
||||
a8: 35333533 0x35333533
|
||||
ac: 3934 fld fa3,112(a0)
|
||||
ae: 3964 fld fs1,240(a0)
|
||||
b0: 3538 fld fa4,104(a0)
|
||||
b2: 3562 fld fa0,56(sp)
|
||||
b4: 3062 fld ft0,56(sp)
|
||||
b6: 3635 jal fffffbe2 <_pocl_kernel_vecadd_workgroup_fast+0xfffffa36>
|
||||
b8: 00293533 sltu a0,s2,sp
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -1,254 +0,0 @@
|
|||
|
||||
#include "../../intrinsics/vx_intrinsics.h"
|
||||
#include "../../io/vx_io.h"
|
||||
#include "../common/tests.h"
|
||||
#include "../../vx_api/vx_api.h"
|
||||
#include "../../fileio/fileio.h"
|
||||
#include <CL/opencl.h>
|
||||
|
||||
// Newlib
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define MAX_KERNELS 1
|
||||
#define KERNEL_NAME "vecadd"
|
||||
#define KERNEL_FILE_NAME "vecadd.pocl"
|
||||
#define SIZE 4
|
||||
#define NUM_WORK_GROUPS 2
|
||||
|
||||
#define CL_CHECK(_expr) \
|
||||
do { \
|
||||
cl_int _err = _expr; \
|
||||
if (_err == CL_SUCCESS) \
|
||||
break; \
|
||||
printf("OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
cleanup(); \
|
||||
exit(-1); \
|
||||
} while (0)
|
||||
|
||||
#define CL_CHECK2(_expr) \
|
||||
({ \
|
||||
cl_int _err = CL_INVALID_VALUE; \
|
||||
typeof(_expr) _ret = _expr; \
|
||||
if (_err != CL_SUCCESS) { \
|
||||
printf("OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
cleanup(); \
|
||||
exit(-1); \
|
||||
} \
|
||||
_ret; \
|
||||
})
|
||||
|
||||
typedef struct {
|
||||
const char* name;
|
||||
const void* pfn;
|
||||
uint32_t num_args;
|
||||
uint32_t num_locals;
|
||||
const uint8_t* arg_types;
|
||||
const uint32_t* local_sizes;
|
||||
} kernel_info_t;
|
||||
|
||||
static int g_num_kernels = 0;
|
||||
static kernel_info_t g_kernels [MAX_KERNELS];
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _pocl_register_kernel(const char* name, const void* pfn, uint32_t num_args, uint32_t num_locals, const uint8_t* arg_types, const uint32_t* local_sizes) {
|
||||
//printf("******** _pocl_register_kernel\n");
|
||||
//printf("Name to register: %s\n", name);
|
||||
//printf("PTR of name: %x\n", name);
|
||||
if (g_num_kernels == MAX_KERNELS)
|
||||
{
|
||||
//printf("ERROR: REACHED MAX KERNELS\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
//printf("Going to register at index: %d\n", g_num_kernels);
|
||||
|
||||
kernel_info_t* kernel = g_kernels + g_num_kernels++;
|
||||
kernel->name = name;
|
||||
kernel->pfn = pfn;
|
||||
kernel->num_args = num_args;
|
||||
kernel->num_locals = num_locals;
|
||||
kernel->arg_types = arg_types;
|
||||
kernel->local_sizes = local_sizes;
|
||||
//printf("New kernel name: %s\n", kernel->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _pocl_query_kernel(const char* name, const void** p_pfn, uint32_t* p_num_args, uint32_t* p_num_locals, const uint8_t** p_arg_types, const uint32_t** p_local_sizes) {
|
||||
//printf("********* Inside _pocl_query_kernel\n");
|
||||
//printf("name: %s\n", name);
|
||||
//printf("g_num_kernels: %d\n", g_num_kernels);
|
||||
for (int i = 0; i < g_num_kernels; ++i) {
|
||||
//printf("Currently quering index %d\n", i);
|
||||
kernel_info_t* kernel = g_kernels + i;
|
||||
if (strcmp(kernel->name, name) != 0)
|
||||
{
|
||||
//printf("STR CMP failed! kernel->name = %s \t name: %s\n", kernel->name, name);
|
||||
continue;
|
||||
}
|
||||
//printf("!!!!!!!!!STR CMP PASSED\n");
|
||||
if (p_pfn) *p_pfn = kernel->pfn;
|
||||
if (p_num_args) *p_num_args = kernel->num_args;
|
||||
if (p_num_locals) *p_num_locals = kernel->num_locals;
|
||||
if (p_arg_types) *p_arg_types = kernel->arg_types;
|
||||
if (p_local_sizes) *p_local_sizes = kernel->local_sizes;
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned *A = NULL;
|
||||
unsigned *B = NULL;
|
||||
unsigned *C = NULL;
|
||||
|
||||
|
||||
// struct context_t {
|
||||
|
||||
// unsigned num_groups[3]; // use {2, 1, 1} for vecadd
|
||||
|
||||
// unsigned global_offset[3]; // use {0, 0, 0} for vecadd
|
||||
|
||||
// unsigned local_size[3]; // use {2, 1, 1} for vecadd
|
||||
|
||||
// unsigned char *printf_buffer; // zero for now
|
||||
|
||||
// unsigned *printf_buffer_position; // initialized to zero
|
||||
|
||||
// unsigned printf_buffer_capacity; // zero for now
|
||||
|
||||
// unsigned work_dim; // use ‘1’ for vecadd
|
||||
|
||||
// };
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
vx_tmc(1);
|
||||
|
||||
printf("\n\n******** Fixing fileio START Native Vecadd running ********\n\n");
|
||||
|
||||
|
||||
// FILE *f = fopen("/home/fares/Desktop/Vortex/simX/reading_data.txt", "r");
|
||||
// fseek(f, 0, SEEK_END);
|
||||
// int fsize = ftell(f);
|
||||
// fseek(f, 0, SEEK_SET); same as rewind(f);
|
||||
|
||||
// char *string = (char *) malloc(fsize + 1);
|
||||
// fread(string, 1, fsize, f);
|
||||
// fclose(f);
|
||||
|
||||
// string[fsize] = 0;
|
||||
|
||||
// printf("%s", string);
|
||||
|
||||
|
||||
// FILE *fp;
|
||||
// char buff[1024];
|
||||
|
||||
// fp = fopen("/home/fares/Desktop/Vortex/simX/reading_data.txt", "r");
|
||||
// // fscanf(fp, "%s %s %s %s", buff);
|
||||
// fgets(buff, 41, (FILE*)fp);
|
||||
// printf("1 : %s\n", buff );
|
||||
|
||||
// exit(0);
|
||||
|
||||
// Allocate memories for input arrays and output arrays.
|
||||
A = (unsigned*)malloc(sizeof(unsigned)*SIZE);
|
||||
B = (unsigned*)malloc(sizeof(unsigned)*SIZE);
|
||||
C = (unsigned*)malloc(sizeof(unsigned)*SIZE);
|
||||
|
||||
|
||||
const void * p_pfn;
|
||||
uint32_t p_num_args;
|
||||
uint32_t p_num_locals;
|
||||
const uint8_t * p_arg_types;
|
||||
const uint32_t* p_local_sizes;
|
||||
|
||||
int found = _pocl_query_kernel(KERNEL_NAME, &p_pfn, &p_num_args, &p_num_locals, &p_arg_types, &p_local_sizes);
|
||||
|
||||
if (found == -1)
|
||||
{
|
||||
printf("_pocl_query_kernel did not find kernel!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("p_pfn : %x\n", p_pfn);
|
||||
printf("p_num_args : %d\n", p_num_args);
|
||||
printf("p_num_locals: %d\n", p_num_locals);
|
||||
|
||||
int i;
|
||||
// Initialize values for array members.
|
||||
for (i=0; i<SIZE; ++i)
|
||||
{
|
||||
A[i] = i*2+0;
|
||||
B[i] = i*2+1;
|
||||
}
|
||||
|
||||
|
||||
// CTX initialization
|
||||
printf("ctx size: %d\n", sizeof(context_t));
|
||||
context_t * ctx = (context_t *) malloc(sizeof(context_t));
|
||||
memset(ctx, 0, sizeof(context_t));
|
||||
ctx->num_groups[0] = 4;
|
||||
ctx->num_groups[1] = 1;
|
||||
ctx->num_groups[2] = 1;
|
||||
|
||||
ctx->global_offset[0] = 0;
|
||||
ctx->global_offset[1] = 0;
|
||||
ctx->global_offset[2] = 0;
|
||||
|
||||
ctx->local_size[0] = 1;
|
||||
ctx->local_size[1] = 1;
|
||||
ctx->local_size[2] = 1;
|
||||
|
||||
ctx->printf_buffer = NULL;
|
||||
ctx->printf_buffer_position = 0;
|
||||
ctx->printf_buffer_capacity = 0;
|
||||
ctx->work_dim = 1;
|
||||
|
||||
// Arguments initialization
|
||||
void **args = (void **)malloc (sizeof(void *) * (p_num_args + p_num_locals));
|
||||
args[0] = &A;
|
||||
args[1] = &B;
|
||||
args[2] = &C;
|
||||
|
||||
printf("A address: %x\n", A);
|
||||
printf("B address: %x\n", B);
|
||||
printf("C address: %x\n", C);
|
||||
printf("args address: %x\n", args);
|
||||
printf("CTX address: %x\n", ctx);
|
||||
|
||||
pocl_spawn(ctx, p_pfn, (void *) args);
|
||||
|
||||
// Testing
|
||||
for (i = 0; i < SIZE; ++i)
|
||||
{
|
||||
printf("Index A[%d]=%d\tB[%d]=%d\tC[%d]=%d\n",i,A[i], i, B[i], i, C[i]);
|
||||
}
|
||||
|
||||
for (i=0; i<SIZE; ++i)
|
||||
{
|
||||
if (C[i] != (A[i] + B[i]))
|
||||
{
|
||||
printf("Failed!\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == SIZE)
|
||||
{
|
||||
printf("Ok pocl_spawn!\n");
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -1,30 +1,37 @@
|
|||
RISCV_TOOLCHAIN_PATH ?= ~/dev/riscv-gnu-toolchain/drops
|
||||
VORTEX_RT_PATH ?= $(wildcard ../..)
|
||||
|
||||
RISCV_TOOLCHAIN_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||
CC = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
AR = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc-ar
|
||||
DP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
COMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../../startup/vx_link.ld -ffreestanding -nostartfiles -nostdlib
|
||||
CFLAGS += -march=rv32im -mabi=ilp32 -O3 -Wl,-Bstatic,-T,$(VORTEX_RT_PATH)/linker/vx_link.ld
|
||||
CFLAGS += -nostartfiles -ffreestanding -fno-exceptions -Wl,--gc-sections
|
||||
CFLAGS += -I$(VORTEX_RT_PATH)/include
|
||||
|
||||
DMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CPY = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
LDFLAGS += $(VORTEX_RT_PATH)/libvortexrt.a
|
||||
|
||||
PROJECT = vx_nl_main
|
||||
|
||||
NEWLIB = ../../newlib/newlib.c ../../newlib/newlib_notimp.c ../../newlib/newlib.s
|
||||
VX_STR = ../../startup/vx_start.S
|
||||
VX_INT = ../../intrinsics/vx_intrinsics.S
|
||||
VX_IO = ../../io/vx_io.S ../../io/vx_io.c
|
||||
VX_API = ../../vx_api/vx_api.c
|
||||
VX_FIO = ../../fileio/fileio.S
|
||||
SRCS = vx_nl_main.c
|
||||
|
||||
VX_MAIN = ./vx_nl_main.c
|
||||
all: $(PROJECT).elf $(PROJECT).hex $(PROJECT).dump
|
||||
|
||||
all: HEX DUMP ELF
|
||||
$(PROJECT).dump: $(PROJECT).elf
|
||||
$(DP) -D $(PROJECT).elf > $(PROJECT).dump
|
||||
|
||||
DUMP: ELF
|
||||
$(DMP) -D vx_nl_main.elf > vx_nl_main.dump
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
$(CP) -O ihex $(PROJECT).elf $(PROJECT).hex
|
||||
|
||||
HEX: ELF
|
||||
$(CPY) -O ihex vx_nl_main.elf vx_nl_main.hex
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
ELF:
|
||||
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_MAIN) /opt/riscv/riscv32-unknown-elf/lib/libc.a /opt/riscv/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc -o vx_nl_main.elf
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/nlTest/$(PROJECT).hex)
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
clean:
|
||||
rm -rf *.elf *.hex *.dump .depend
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
|
||||
#include "../../intrinsics/vx_intrinsics.h"
|
||||
#include "../../io/vx_io.h"
|
||||
#include "../common/tests.h"
|
||||
#include "../../vx_api/vx_api.h"
|
||||
#include "../../fileio/fileio.h"
|
||||
#include <vx_intrinsics.h>
|
||||
|
||||
// #include <utlist.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -27,8 +27,11 @@ $(PROJECT).hex: $(PROJECT).elf
|
|||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/simple/$(PROJECT).hex)
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
clean:
|
||||
rm -rf *.elf *.hex *.dump .depend
|
||||
rm -rf *.elf *.hex *.dump .depend
|
||||
|
|
|
@ -1,35 +1,38 @@
|
|||
RISCV_TOOLCHAIN_PATH ?= ~/dev/riscv-gnu-toolchain/drops
|
||||
VORTEX_RT_PATH ?= $(wildcard ../..)
|
||||
|
||||
RISCV_TOOLCHAIN_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||
CC = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
AR = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc-ar
|
||||
DP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
COMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-g++
|
||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostartfiles
|
||||
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,../../startup/vx_link.ld -march=rv32im -mabi=ilp32
|
||||
CFLAGS += -march=rv32im -mabi=ilp32 -O3 -Wl,-Bstatic,-T,$(VORTEX_RT_PATH)/linker/vx_link.ld
|
||||
CFLAGS += -nostartfiles -ffreestanding -fno-exceptions -Wl,--gc-sections
|
||||
CFLAGS += -I$(VORTEX_RT_PATH)/include -I./include
|
||||
|
||||
DMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CPY = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
LDFLAGS += $(VORTEX_RT_PATH)/libvortexrt.a
|
||||
LDFLAGS += ./libs/libOpenCL.a
|
||||
|
||||
# VX_STR = ../../startup/vx_start.S
|
||||
PROJECT = vx_pocl_main
|
||||
|
||||
SRCS = vx_pocl_main.c
|
||||
|
||||
all: $(PROJECT).elf $(PROJECT).hex $(PROJECT).dump
|
||||
|
||||
NEWLIB = ../../newlib/newlib.c
|
||||
VX_STR = ../../startup/vx_start.S
|
||||
VX_INT = ../../intrinsics/vx_intrinsics.S
|
||||
VX_IO = ../../io/vx_io.S ../../io/vx_io.c
|
||||
VX_API = ../../vx_api/vx_api.c
|
||||
VX_FIO = ../../fileio/fileio.S
|
||||
LIBS = -Wl,--whole-archive ./libs/libvecadd.a -Wl,--no-whole-archive ./libs/libOpenCL.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libc.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||
$(PROJECT).dump: $(PROJECT).elf
|
||||
$(DP) -D $(PROJECT).elf > $(PROJECT).dump
|
||||
|
||||
VX_MAIN = vx_pocl_main
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
$(CP) -O ihex $(PROJECT).elf $(PROJECT).hex
|
||||
|
||||
all: HEX DUMP ELF
|
||||
$(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
DUMP: ELF
|
||||
$(DMP) -D $(VX_MAIN).elf > $(VX_MAIN).dump
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex -f ../../../runtime/tests/vecadd/$(PROJECT).hex)
|
||||
|
||||
HEX: ELF
|
||||
$(CPY) -O ihex $(VX_MAIN).elf $(VX_MAIN).hex
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
ELF:
|
||||
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_MAIN).c $(LIBS) -Iinclude -o $(VX_MAIN).elf
|
||||
clean:
|
||||
rm -rf *.elf *.hex *.dump .depend
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
|
||||
#include "../../intrinsics/vx_intrinsics.h"
|
||||
#include "../../io/vx_io.h"
|
||||
#include "../common/tests.h"
|
||||
#include "../../vx_api/vx_api.h"
|
||||
#include "../../fileio/fileio.h"
|
||||
#include <vx_intrinsics.h>
|
||||
#include <CL/opencl.h>
|
||||
|
||||
// Newlib
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
RISCV_TOOLCHAIN_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||
|
||||
COMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
|
||||
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,../../startup/vx_link.ld -march=rv32imv -mabi=ilp32
|
||||
|
||||
DMP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
CPY = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
|
||||
# VX_STR = ../../startup/vx_start.S
|
||||
|
||||
|
||||
|
||||
NEWLIB = ../../newlib/newlib.c
|
||||
VX_STR = ../../startup/vx_start.S
|
||||
VX_INT = ../../intrinsics/vx_intrinsics.s
|
||||
VX_IO = ../../io/vx_io.S ../../io/vx_io.c
|
||||
VX_API = ../../vx_api/vx_api.c
|
||||
VX_FIO = ../../fileio/fileio.S
|
||||
VX_VEC = vx_vec.s
|
||||
LIBS = $(RISCV_TOOLCHAIN_PATH)/riscv32-unknown-elf/lib/libc.a $(RISCV_TOOLCHAIN_PATH)/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||
|
||||
VX_MAIN = vx_vector_main
|
||||
|
||||
all: HEX DUMP ELF
|
||||
|
||||
DUMP: ELF
|
||||
$(DMP) -D $(VX_MAIN).elf > $(VX_MAIN).dump
|
||||
|
||||
HEX: ELF
|
||||
$(CPY) -O ihex $(VX_MAIN).elf $(VX_MAIN).hex
|
||||
|
||||
ELF:
|
||||
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_VEC) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_MAIN).c $(LIBS) -Iinclude -o $(VX_MAIN).elf
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,592 +0,0 @@
|
|||
:0200000480007A
|
||||
:100000009705000093854506130540006B10B50069
|
||||
:10001000EF004005130510006B0005001385C108B3
|
||||
:100020001386810C3306A64093050000EF10403C78
|
||||
:1000300017150000130505AFEF00502AEF005034EC
|
||||
:08004000EF00D0156F00D02A7B
|
||||
:10004800B70700009387070063880700371500800B
|
||||
:10005800130505B26F0010286780000013054000E3
|
||||
:100068006B000500972100009381C179F3261002E7
|
||||
:100078009396A601732600029315A6001316260070
|
||||
:1000880037F1FF6F3301B1403301D1403301C10073
|
||||
:10009800F326100263860600130500006B000500B6
|
||||
:1000A80067800000D772850007E0051233055540C8
|
||||
:1000B80093922200B38555008760061233065600D6
|
||||
:1000C8005781000227E10602B3865600E31E05FCAD
|
||||
:1000D800D72021B667800000130101FD2326810285
|
||||
:1000E80013040103232EA4FC232CB4FC232AC4FCF0
|
||||
:1000F8008327C4FD83A707002326F4FE930744FD46
|
||||
:100108002322F4FE832744FE03C707008327C4FE87
|
||||
:100118002380E7008327C4FE93871700032744FE44
|
||||
:10012800034717002380E7008327C4FE938727002F
|
||||
:10013800032744FE034727002380E7008327C4FEE4
|
||||
:1001480093873700032744FE034737002380E700DF
|
||||
:100158008327C4FE938747002326F4FE232404FE46
|
||||
:100168006F004003832784FE032784FDB307F7004D
|
||||
:1001780003C707008327C4FE2380E7008327C4FE44
|
||||
:10018800938717002326F4FE832784FE938717009E
|
||||
:100198002324F4FE832744FD032784FEE344F7FC6D
|
||||
:1001A8008327C4FE2320F4FE832704FE93F7370039
|
||||
:1001B800032704FEB307F7002320F4FE832704FE79
|
||||
:1001C8002326F4FE8327C4FD0327C4FE23A0E700EB
|
||||
:1001D800130000000324C10213010103678000001B
|
||||
:1001E800130101FC232E8102130401042326A4FC1D
|
||||
:1001F8002324B4FC8327C4FC83A707002326F4FE2A
|
||||
:100208009307C4FD2322F4FE8327C4FE03C7070017
|
||||
:10021800832744FE2380E700832744FE9387170043
|
||||
:100228000327C4FE034717002380E700832744FE03
|
||||
:10023800938727000327C4FE034727002380E7008E
|
||||
:10024800832744FE938737000327C4FE03473700FC
|
||||
:100258002380E7008327C4FE938747002326F4FE04
|
||||
:10026800232404FE6F004003832784FE032784FCB5
|
||||
:10027800B307F7000327C4FE034707002380E700FE
|
||||
:100288008327C4FE938717002326F4FE832784FE62
|
||||
:10029800938717002324F4FE8327C4FD032784FED5
|
||||
:1002A800E344F7FC8327C4FE2320F4FE832704FEDF
|
||||
:1002B80093F73700032704FEB307F7002320F4FE63
|
||||
:1002C800832704FE2326F4FE8327C4FC0327C4FEE9
|
||||
:1002D80023A0E700130000000324C1031301010455
|
||||
:1002E80067800000130101FF232681001304010128
|
||||
:1002F800130000000324C1001301010167800000FE
|
||||
:10030800130101FE232E8100130401022326A4FEFB
|
||||
:100318002324B4FE832784FE3727000023A2E700A6
|
||||
:1003280093070000138507000324C101130101028C
|
||||
:1003380067800000130101FE232E1100232C810089
|
||||
:10034800130401022326A4FEB7270080138507B3F0
|
||||
:10035800EF00C04F93071000138507008320C101E9
|
||||
:10036800032481011301010267800000130101FDCC
|
||||
:10037800232611022324810213040103232EA4FC43
|
||||
:10038800232CB4FC232AC4FCB70700712326F4FEEF
|
||||
:10039800B70700722324F4FE930730002322F4FEEB
|
||||
:1003A800130744FE9307C4FE130640009305070095
|
||||
:1003B80013850700EFF05FD21307C4FD9307C4FE4F
|
||||
:1003C800130640009305070013850700EFF0DFD000
|
||||
:1003D800130784FD9307C4FE130640009305070026
|
||||
:1003E80013850700EFF05FCF130744FD9307C4FEA2
|
||||
:1003F800130640009305070013850700EFF0DFCDD3
|
||||
:1004080083A74107E7800700130704FE930784FECC
|
||||
:100418009305070013850700EFF09FDC832704FE90
|
||||
:10042800138507008320C1020324810213010103FD
|
||||
:1004380067800000130101FD232611022324810295
|
||||
:1004480013040103232EA4FC232CB4FC232AC4FC8C
|
||||
:10045800B70700712324F4FEB70700722326F4FEC1
|
||||
:10046800930740002322F4FE130744FE930784FEFB
|
||||
:10047800130640009305070013850700EFF0DFC55A
|
||||
:100488001307C4FD930784FE130640009305070075
|
||||
:1004980013850700EFF05FC4130784FD930784FEFC
|
||||
:1004A800130640009305070013850700EFF0DFC22D
|
||||
:1004B800130744FD930784FE1306400093050700C5
|
||||
:1004C80013850700EFF05FC183A74107E7800700A6
|
||||
:1004D800832744FD138507008320C102032481027A
|
||||
:1004E8001301010367800000130101FD2326110297
|
||||
:1004F8002324810213040103232EA4FC232CB4FC1F
|
||||
:10050800232AC4FCB70700712326F4FE9307500082
|
||||
:100518002324F4FE130784FE9307C4FE1306400049
|
||||
:100528009305070013850700EFF01FBB1307C4FDF1
|
||||
:100538009307C4FE130640009305070013850700C0
|
||||
:10054800EFF09FB99307C4FE032644FD832584FD7D
|
||||
:1005580013850700EFF05FB883A74107E78007001E
|
||||
:10056800832744FD138507008320C10203248102E9
|
||||
:100578001301010367800000130101FD2326810296
|
||||
:1005880013040103232EA4FC8327C4FD63D80700AA
|
||||
:100598008327C4FDB307F040232EF4FC0327C4FDD2
|
||||
:1005A800B73700009387078063D8E700B7370000A4
|
||||
:1005B80093870780232EF4FC83A781072326F4FE64
|
||||
:1005C80003A781078327C4FD3307F70023ACE1069F
|
||||
:1005D8008327C4FE138507000324C1021301010306
|
||||
:1005E80067800000130101FE232E1100232C8100D7
|
||||
:1005F800130401022326A4FE13050000EF00001EC9
|
||||
:10060800130000008320C1010324810113010102AA
|
||||
:1006180067800000130101FD2326110223248102B3
|
||||
:1006280013040103232EA4FC232CB4FC232AC4FCAA
|
||||
:10063800B70700712326F4FEB70700722324F4FEDF
|
||||
:10064800930770002322F4FE130744FE9307C4FEA9
|
||||
:10065800130640009305070013850700EFF0DFA796
|
||||
:100668001307C4FD9307C4FE130640009305070053
|
||||
:1006780013850700EFF05FA6130784FD9307C4FEF8
|
||||
:10068800130640009305070013850700EFF0DFA469
|
||||
:10069800130744FD9307C4FE1306400093050700A3
|
||||
:1006A80013850700EFF05FA383A74107E7800700E2
|
||||
:1006B800130704FE930784FE9305070013850700BC
|
||||
:1006C800EFF01FB2832704FE138507008320C102C1
|
||||
:1006D800032481021301010367800000130101FF55
|
||||
:1006E800232611002324810013040101B727008069
|
||||
:1006F800138547B4EF008015130000008320C10064
|
||||
:10070800032481001301010167800000130101FF28
|
||||
:10071800232611002324810013040101EF00800E19
|
||||
:1007280093070500138507008320C1000324810077
|
||||
:100738001301010167800000130101FF2326110046
|
||||
:100748002324810013040101B7270080138587B68D
|
||||
:10075800EF00C00F130000008320C10003248100B4
|
||||
:100768001301010167800000130101FF2326110016
|
||||
:100778002324810013040101B72700801385C7B81B
|
||||
:10078800EF00C00C83A781099386170023ACD1081A
|
||||
:10079800138507008320C100032481001301010190
|
||||
:1007A80067800000130101FF232611002324810024
|
||||
:1007B80013040101B7270080138587BBEF000009E8
|
||||
:1007C800130000008320C1000324810013010101EC
|
||||
:1007D800678000006B10B500678000006B000500A3
|
||||
:1007E800678000006B40B500678000006B20050043
|
||||
:1007F800678000006B3000006780000073251002DE
|
||||
:100808006780000073250002678000001305400020
|
||||
:100818006B000500F32610029396F600732600027B
|
||||
:100828009315A6001316260037F1FF6F3301B14068
|
||||
:100838003301D1403301C100F3261002638606005C
|
||||
:10084800130500006B00050067800000130141FFDD
|
||||
:10085800232011002322B100834505006388050089
|
||||
:10086800EF00C001130515006FF01FFF8320010082
|
||||
:10087800832541001301C10067800000B702010011
|
||||
:1008880023A0B20067800000130101FD2326110296
|
||||
:100898002324810213040103232EA4FC0327C4FD8F
|
||||
:1008A8009307F00063E4E702B72700800327C4FD3D
|
||||
:1008B8001317270093878700B307F70083A707005C
|
||||
:1008C80013850700EFF09FF86F00400793070002B9
|
||||
:1008D8002326F4FEA30504FE8327C4FE9387C7FFDF
|
||||
:1008E8000327C4FDB357F70093F7F7002322F4FE5C
|
||||
:1008F800832744FE6386070093071000A305F4FED0
|
||||
:100908008347B4FE63820702B7270080032744FEAB
|
||||
:100918001317270093878700B307F70083A70700FB
|
||||
:1009280013850700EFF09FF28327C4FE9387C7FF64
|
||||
:100938002326F4FE8327C4FEE340F0FA8320C10295
|
||||
:10094800032481021301010367800000130101FEE3
|
||||
:10095800232E1100232C8100130401022326A4FE58
|
||||
:100968002324B4FE0325C4FEEFF05FEE032584FEC6
|
||||
:10097800EFF09FF1B72700801385C7C1EFF01FED97
|
||||
:10098800130000008320C101032481011301010227
|
||||
:1009980067800000130101FD232611022324810230
|
||||
:1009A8001304010313051000EFF05FE3930700023F
|
||||
:1009B8002322F4FE832744FE93972700138507001C
|
||||
:1009C800EF004025930705002320F4FE832744FE0B
|
||||
:1009D8009397270013850700EF00C02393070500AE
|
||||
:1009E800232EF4FC832744FE9397270013850700E2
|
||||
:1009F800EF00402293070500232CF4FC232604FE75
|
||||
:100A08006F0080058327C4FE93972700032704FE01
|
||||
:100A1800B307F7001307100023A0E7008327C4FEDD
|
||||
:100A2800939727000327C4FDB307F70013071000A7
|
||||
:100A380023A0E7008327C4FE93972700032784FD9C
|
||||
:100A4800B307F7001307100023A0E7008327C4FEAD
|
||||
:100A5800938717002326F4FE0327C4FE832744FE4A
|
||||
:100A6800E342F7FA832684FD0326C4FD832504FEAA
|
||||
:100A7800032544FEEFF00FE3232404FE6F00C002B9
|
||||
:100A8800832784FE93972700032784FDB307F70085
|
||||
:100A980083A7070013850700EFF01FDF832784FE75
|
||||
:100AA800938717002324F4FE032784FE832744FE3C
|
||||
:100AB800E348F7FC13050000EFF05FD213000000D5
|
||||
:100AC800138507008320C102032481021301010357
|
||||
:100AD80067800000930505009306000013060000D8
|
||||
:100AE800130500006F005024130101FF9305000057
|
||||
:100AF800232481002326110013040500EF00502C45
|
||||
:100B080003A501078327C50363840700E78007005F
|
||||
:100B180013050400EFF01FAD130101FF232481002A
|
||||
:100B28002322910037240080B72400809387440053
|
||||
:100B3800130444003304F4402326110013542440C2
|
||||
:100B480063020402931424009384C4FFB384F40062
|
||||
:100B580083A704001304F4FF9384C4FFE78007000D
|
||||
:100B6800E31804FE8320C10003248100832441008C
|
||||
:100B78001301010167800000130101FF2324810094
|
||||
:100B8800232021013724008037290080930704009F
|
||||
:100B9800130909003309F940232611002322910083
|
||||
:100BA8001359294063000902130404009304000048
|
||||
:100BB800832704009384140013044400E78007008B
|
||||
:100BC800E31899FE37240080372900809307040032
|
||||
:100BD800130949003309F9401359294063000902F0
|
||||
:100BE8001304040093040000832704009384140072
|
||||
:100BF80013044400E7800700E31899FE8320C1002E
|
||||
:100C08000324810083244100032901001301010109
|
||||
:100C1800678000009305050003A501086F00000127
|
||||
:100C28009305050003A501086F00103D130101FDA0
|
||||
:100C380023229102232E310123261102232481022B
|
||||
:100C480023202103232C4101232A51012328610158
|
||||
:100C58002326710123248101232291019384B50065
|
||||
:100C6800930760019309050063E497069307000161
|
||||
:100C780063ECB720EF00100593040001930780018F
|
||||
:100C880013062000138981C6B307F90003A447009F
|
||||
:100C9800138787FF6302E424832744008326C40064
|
||||
:100CA8000326840093F7C7FFB307F40003A74700A0
|
||||
:100CB8002326D60023A4C60013671700138509004E
|
||||
:100CC80023A2E700EF005000130584006F00801C8A
|
||||
:100CD80093F484FF63CA041A63E8B41AEF00807EB1
|
||||
:100CE8009307701F63F8974693D79400638E071C89
|
||||
:100CF80013074000636CF73E93D76400138697038D
|
||||
:100D08001385870393163600138981C6B306D90065
|
||||
:100D180003A44600938686FF638C860283274400DB
|
||||
:100D28009305F00093F7C7FF3387974063C0E50248
|
||||
:100D3800635807340324C400638C86008327440067
|
||||
:100D480093F7C7FF33879740E3D4E5FE1306050002
|
||||
:100D58000324090113088900630C0419832544003E
|
||||
:100D68001307F00093F5C5FFB3879540634AF74032
|
||||
:100D7800232A09012328090163D4073E9307F01F9A
|
||||
:100D880063E6B73093D535009387150093973700FE
|
||||
:100D980003254900B307F90083A6070093D525402A
|
||||
:100DA800130710003317B7003367A700938587FF31
|
||||
:100DB8002326B4002324D4002322E90023A087009B
|
||||
:100DC80023A686009357264093061000B396F60094
|
||||
:100DD800636AD712B3F7E600639407029396160086
|
||||
:100DE8001376C6FFB3F7E60013064600639A0700BA
|
||||
:100DF80093961600B3F7E60013064600E38A07FE4B
|
||||
:100E08001305F00093183600B308190193850800FC
|
||||
:100E18001303060003A4C500639A85006F00402FE2
|
||||
:100E2800635207300324C4006384852E832744005B
|
||||
:100E380093F7C7FF33879740E354E5FE8326C40042
|
||||
:100E48000326840093E514002322B4002326D60049
|
||||
:100E580023A4C600B3049400232A990023289900E8
|
||||
:100E68009366170023A6040123A4040123A2D40037
|
||||
:100E7800B307F4001385090023A0E700EF00C0645E
|
||||
:100E8800130584006F0000019307C00023A0F90038
|
||||
:100E9800130500008320C102032481028324410238
|
||||
:100EA800032901028329C101032A8101832A4101FF
|
||||
:100EB800032B0101832BC100032C8100832C4100EB
|
||||
:100EC8001301010367800000930600201306000445
|
||||
:100ED8001305F0036FF05FE303A4C70013062600B1
|
||||
:100EE800E39C87DA0324090113088900E31804E75F
|
||||
:100EF800032749009357264093061000B396F6003F
|
||||
:100F0800E37AD7EC03248900832A440013FCCAFF40
|
||||
:100F180063689C00B3079C401307F000634EF71208
|
||||
:100F280083AA410903A741089307F0FF330A840104
|
||||
:100F3800B38A54016308F732B71700009387F700A4
|
||||
:100F4800B38AFA00B7F7FFFFB3FAFA0093850A00ED
|
||||
:100F580013850900EF0080579307F0FF130B050076
|
||||
:100F6800630AF52663664527938BC10983A70B009F
|
||||
:100F7800B387FA0023A0FB00138707006306AA388B
|
||||
:100F880083A641089307F0FF638EF638330A4B4176
|
||||
:100F98003307EA0023A0EB00937C7B0063860C2ECA
|
||||
:100FA800330B9B41B7170000130B8B00138AF7FF15
|
||||
:100FB800B30A5B019387870033F74A01B3879741E8
|
||||
:100FC800B387E74033FA470193050A001385090000
|
||||
:100FD800EF00C04F9307F0FF6300F53A3305654112
|
||||
:100FE800B30A450183A70B002324690193EA1A0079
|
||||
:100FF800B307FA0023A0FB0023225B016308243314
|
||||
:101008001306F000637886338326440013074CFFE9
|
||||
:10101800137787FF93F61600B3E6E6002322D40081
|
||||
:1010280093055000B306E40023A2B60023A4B6003B
|
||||
:10103800636EE634832A4B0013040B0083A6010970
|
||||
:1010480063F4F60023A8F10883A6C10863F8F6182C
|
||||
:1010580023A6F1086F00801813E714002322E40088
|
||||
:10106800B30494002324990093E71700138509001B
|
||||
:1010780023A2F400EF004045130584006FF09FE1C0
|
||||
:101088008326C400032684006FF01FC293D79500FF
|
||||
:10109800130740006374F712130740016360F722D7
|
||||
:1010A8009386C7051387B70593963600B306D9000C
|
||||
:1010B80083A70600938686FF638AF61A03A747006C
|
||||
:1010C8001377C7FF63F6E50083A78700E398F6FE6A
|
||||
:1010D80083A6C700032749002326D4002324F4004D
|
||||
:1010E80023A4860023A687006FF0DFCD13074001F5
|
||||
:1010F8006378F710130740056360F71E93D7C400A1
|
||||
:101108001386F7061385E706931636006FF0DFBFE0
|
||||
:10111800130313009377330093858500E39C07CE70
|
||||
:101128006F00C00FB307F40003A747008326C4006D
|
||||
:10113800032684001367170023A2E7002326D6009E
|
||||
:101148001385090023A4C600EF00003813058400A6
|
||||
:101158006FF05FD413D63400938784006FF09FB28A
|
||||
:10116800B305B40083A745001385090093E717006A
|
||||
:1011780023A2F500EF004035130584006FF09FD1DE
|
||||
:1011880013E714002322E400B3049400232A9900EF
|
||||
:101198002328990013E7170023A6040123A40401B8
|
||||
:1011A80023A2E400B305B4001385090023A0F500C9
|
||||
:1011B800EF008031130584006FF0DFCD93D7650011
|
||||
:1011C8009386970313878703939636006FF01FEE75
|
||||
:1011D8006302241303248900832A440093FACAFF74
|
||||
:1011E800B3879A4063E69A001307F000E346F7E6F0
|
||||
:1011F80013850900EF00402D130500006FF09FC90B
|
||||
:101208001386C7051385B705931636006FF0DFAF51
|
||||
:1012180083A788001306F6FF6394171D937736009B
|
||||
:10122800938888FFE39607FE0327490093C7F6FFD4
|
||||
:10123800B3F7E7002322F90093961600E3E4D7CC2E
|
||||
:10124800E38206CC33F7F600631A0700939616007C
|
||||
:1012580033F7F60013034300E30A07FE13060300FF
|
||||
:101268006FF05FBA938A0A016FF05FCE03254900D9
|
||||
:1012780093552740130710003317B7003367A700AB
|
||||
:101288002322E9006FF05FE5B71700001387F7FF27
|
||||
:10129800330A5B01337AEA00B387474133FAE70040
|
||||
:1012A80093050A0013850900EF0040229307F0FF19
|
||||
:1012B800E316F5D2130A00006FF0DFD213074005DA
|
||||
:1012C8006360F70893D7C5009386F7061387E70688
|
||||
:1012D800939636006FF09FDD130740156360F7089B
|
||||
:1012E80093D7F4001386870713857707931636007C
|
||||
:1012F8006FF09FA1938BC10903A70B003387EA0006
|
||||
:1013080023A0EB006FF0DFC793164A01E39A06C6E5
|
||||
:1013180003248900B30A5C0193EA1A0023225401CA
|
||||
:101328006FF0DFD123A261096FF01FC713040B0010
|
||||
:101338006FF0DFD0930710002322FB006FF05FEB04
|
||||
:10134800130740156362F70693D7F500938687075E
|
||||
:1013580013877707939636006FF05FD513074055CC
|
||||
:101368006362F70693D724011386D7071385C70747
|
||||
:10137800931636006FF05F99938C8CFFB38A9A01AD
|
||||
:10138800B38A6A41130A00006FF0DFC59305840031
|
||||
:1013980013850900EF0040460324890083A70B004A
|
||||
:1013A800832A44006FF09FC9130740556364F7020E
|
||||
:1013B80093D725019386D7071387C70793963600D7
|
||||
:1013C8006FF0DFCE9306803F1306F0071305E007A2
|
||||
:1013D8006FF09F939306803F1307E0076FF01FCDD0
|
||||
:1013E800832749006FF05FE51303F000130705003A
|
||||
:1013F800637EC3029377F7006390070A6392050838
|
||||
:10140800937606FF1376F600B386E6002320B7002E
|
||||
:101418002322B7002324B7002326B70013070701A8
|
||||
:10142800E366D7FE6314060067800000B306C34076
|
||||
:101438009396260097020000B38656006780C60080
|
||||
:101448002307B700A306B7002306B700A305B70014
|
||||
:101458002305B700A304B7002304B700A303B7000C
|
||||
:101468002303B700A302B7002302B700A301B70004
|
||||
:101478002301B700A300B7002300B700678000006E
|
||||
:1014880093F5F50F93968500B3E5D500939605017E
|
||||
:10149800B3E5D5006FF0DFF69396270097020000BA
|
||||
:1014A800B386560093820000E78006FA9380020014
|
||||
:1014B800938707FF3307F7403306F600E378C3F650
|
||||
:1014C8006FF0DFF36780000067800000130101FF01
|
||||
:1014D800232481002322910093040500138505002D
|
||||
:1014E8002326110023A2010CEFF00F899307F0FFC8
|
||||
:1014F800630CF5008320C10003248100832441008C
|
||||
:10150800130101016780000083A7410CE38407FEF3
|
||||
:101518008320C1000324810023A0F4008324410018
|
||||
:10152800130101016780000003A7010783278714BF
|
||||
:10153800638C070403A747001308F001634EE8060D
|
||||
:101548001318270063060502338307012324C30801
|
||||
:1015580083A88718130610003316E600B3E8C800FE
|
||||
:1015680023A417192324D310930620006304D5025B
|
||||
:101578001307170023A2E700B387070123A4B700C6
|
||||
:1015880013050000678000009307C7142324F7148D
|
||||
:101598006FF05FFA83A6C7181307170023A2E700A6
|
||||
:1015A80033E6C60023A6C718B387070123A4B700EC
|
||||
:1015B80013050000678000001305F0FF6780000036
|
||||
:1015C800130101FD2324810103AC0107232E3101FE
|
||||
:1015D800232C4101232A51012328610123261102CA
|
||||
:1015E800232481022322910223202103232671012F
|
||||
:1015F800930A0500138B0500130A10009309F0FFE6
|
||||
:1016080003298C1463080902832449001384F4FF16
|
||||
:101618006342040293942400B304990063040B0406
|
||||
:1016280083A74410638067051304F4FF9384C4FF01
|
||||
:10163800E31634FF8320C10203248102832441027C
|
||||
:10164800032901028329C101032A8101832A410157
|
||||
:10165800032B0101832BC100032C8100130101031B
|
||||
:10166800678000008327490083A644009387F7FF1B
|
||||
:10167800638A870423A20400E38806FA832789186B
|
||||
:1016880033178A00832B4900B377F700639E07005E
|
||||
:10169800E780060083274900E39477F783278C14B3
|
||||
:1016A800E38427F96FF0DFF58327C91883A5440879
|
||||
:1016B8003377F700631C070013850A00E7800600EC
|
||||
:1016C8006FF05FFD232289006FF01FFB1385050073
|
||||
:1016D800E78006006FF01FFC130101FE232821019B
|
||||
:1016E800232C8100232A910023263101138405002D
|
||||
:1016F800232E110093090500138981C6EFF09FDCA2
|
||||
:1017080083268900371700009307F7FE83A4460055
|
||||
:101718003384874093F4C4FF330494001354C40003
|
||||
:101728001304F4FF1314C400634EE400930500008F
|
||||
:1017380013850900EFF09FD983278900B3879700A5
|
||||
:101748006306F50213850900EFF01FD88320C10155
|
||||
:101758000324810183244101032901018329C10054
|
||||
:10176800130500001301010267800000B3058040E3
|
||||
:1017780013850900EFF09FD59307F0FF6304F50484
|
||||
:1017880083A7C10983268900B384844093E41400A5
|
||||
:10179800338487401385090023A2960023AE81086D
|
||||
:1017A800EFF09FD28320C1010324810183244101EA
|
||||
:1017B800032901018329C100130510001301010247
|
||||
:1017C800678000009305000013850900EFF01FD023
|
||||
:1017D800032789009306F000B307E540E3D4F6F643
|
||||
:1017E80083A6410893E717002322F7003305D54065
|
||||
:1017F80023AEA1086FF01FF563860512130101FFE0
|
||||
:1018080023248100232291001384050093040500FA
|
||||
:1018180023261100EFF01FCB0325C4FF130784FF15
|
||||
:101828009377E5FF3306F700938581C68326460044
|
||||
:1018380003A8850093F6C6FF630EC8182322D600B6
|
||||
:10184800137515003308D6006310050A032384FFB7
|
||||
:10185800032848003307674083288700138501C79A
|
||||
:10186800B3876700137818006380A8140323C700A0
|
||||
:1018780023A66800232413016306081C93E61700B7
|
||||
:101888002322D7002320F6009306F01F63E8F60A08
|
||||
:1018980093D73700938617009396360003A8450020
|
||||
:1018A800B386D50003A5060013D62740930710007A
|
||||
:1018B800B397C700B3E70701138686FF2326C7003F
|
||||
:1018C8002324A70023A2F50023A0E6002326E50091
|
||||
:1018D800032481008320C100138504008324410070
|
||||
:1018E800130101016FF05FBE032548001375150051
|
||||
:1018F800631C0502B387D700138501C783268600BA
|
||||
:1019080093E817003308F700638AA6140326C60075
|
||||
:1019180023A6C6002324D600232217012320F8007B
|
||||
:101928006FF09FF66780000093E61700232ED4FE21
|
||||
:101938002320F6009306F01FE3FCF6F493D69700F5
|
||||
:1019480013064000636ED60C93D667001385960382
|
||||
:1019580013868603131535003385A50083260500F5
|
||||
:10196800130585FF630AD51003A646001376C6FF44
|
||||
:1019780063F6C70083A68600E318D5FE03A5C60054
|
||||
:101988002326A7002324D700032481002324E5006D
|
||||
:101998008320C100138504008324410023A6E600A8
|
||||
:1019A800130101016FF05FB26318081283258600E6
|
||||
:1019B8000326C600B387F60093E6170023A6C500E2
|
||||
:1019C8002324B6002322D7003307F7002320F7008B
|
||||
:1019D8006FF01FF013751500B387D7006310050269
|
||||
:1019E800032584FF3307A7408326C7000326870003
|
||||
:1019F800B387A7002326D60023A4C60013E6170042
|
||||
:101A080083A681082322C70023A4E500E3E2D7ECDC
|
||||
:101A180083A5410913850400EFF01FCC6FF05FEB3D
|
||||
:101A2800130640016374D602130640056364D606A4
|
||||
:101A380093D6C7001385F6061386E60613153500F8
|
||||
:101A48006FF09FF1B387D7006FF05FEB1385C60582
|
||||
:101A58001386B605131535006FF01FF023AAE500AD
|
||||
:101A680023A8E5002326A7002324A7002322170183
|
||||
:101A78002320F8006FF0DFE503A845001356264041
|
||||
:101A8800930710003396C7003366060123A2C500EA
|
||||
:101A98006FF01FEF13064015636CD60093D6F7005E
|
||||
:101AA8001385860713867607131535006FF0DFEA6E
|
||||
:101AB80013064055636CD60093D627011385D607C5
|
||||
:101AC8001386C607131535006FF01FE91305803F0D
|
||||
:101AD8001306E0076FF05FE893E617002322D700AC
|
||||
:081AE8002320F6006FF0DFDEA1
|
||||
:101AF0003000000031000000320000003300000020
|
||||
:101B000034000000350000003600000037000000FF
|
||||
:101B10003800000039000000610000006200000091
|
||||
:101B20006300000064000000650000006600000023
|
||||
:101B300048656C6C6F2066726F6D205F69736174AD
|
||||
:101B400074790A004552524F523A205F6B696C6CAF
|
||||
:101B5000206E6F742079657420696D706C656D6599
|
||||
:101B60006E7465640A0000004552524F523A205F7D
|
||||
:101B7000756E6C696E6B206E6F7420796574206968
|
||||
:101B80006D706C656D656E7465640A004552524FE8
|
||||
:101B9000523A205F67657474696D656F6664617938
|
||||
:101BA000206E6F742079657420696D706C656D6549
|
||||
:101BB0006E7465640A0000004552524F523A205F2D
|
||||
:101BC0006C696E6B206E6F742079657420696D701E
|
||||
:101BD0006C656D656E7465640A000000300000007D
|
||||
:101BE000310000003200000033000000340000002B
|
||||
:101BF000350000003600000037000000380000000B
|
||||
:101C00003900000061000000620000006300000075
|
||||
:0E1C10006400000065000000660000000A008D
|
||||
:042000004800008014
|
||||
:10200800DC1B0080E01B0080E41B0080E81B0080D4
|
||||
:10201800EC1B0080F01B0080F41B0080F81B008084
|
||||
:10202800FC1B0080001C0080041C0080081C008031
|
||||
:102038000C1C0080101C0080141C0080181C0080E0
|
||||
:1020480000000000342300809C23008004240080CA
|
||||
:102058000000000000000000000000000000000078
|
||||
:102068000000000000000000000000000000000068
|
||||
:102078000000000000000000000000000000000058
|
||||
:102088000000000000000000000000000000000048
|
||||
:102098000000000000000000000000000000000038
|
||||
:1020A8000000000000000000000000000000000028
|
||||
:1020B8000000000000000000000000000000000018
|
||||
:1020C8000000000000000000000000000000000008
|
||||
:1020D80000000000000000000000000000000000F8
|
||||
:1020E80000000000000000000100000000000000E7
|
||||
:1020F8000E33CDAB34126DE6ECDE05000B000000AC
|
||||
:1021080000000000000000000000000000000000C7
|
||||
:1021180000000000000000000000000000000000B7
|
||||
:1021280000000000000000000000000000000000A7
|
||||
:102138000000000000000000000000000000000097
|
||||
:102148000000000000000000000000000000000087
|
||||
:102158000000000000000000000000000000000077
|
||||
:102168000000000000000000000000000000000067
|
||||
:102178000000000000000000000000000000000057
|
||||
:102188000000000000000000000000000000000047
|
||||
:102198000000000000000000000000000000000037
|
||||
:1021A8000000000000000000000000000000000027
|
||||
:1021B8000000000000000000000000000000000017
|
||||
:1021C8000000000000000000000000000000000007
|
||||
:1021D80000000000000000000000000000000000F7
|
||||
:1021E80000000000000000000000000000000000E7
|
||||
:1021F80000000000000000000000000000000000D7
|
||||
:1022080000000000000000000000000000000000C6
|
||||
:1022180000000000000000000000000000000000B6
|
||||
:1022280000000000000000000000000000000000A6
|
||||
:102238000000000000000000000000000000000096
|
||||
:102248000000000000000000000000000000000086
|
||||
:102258000000000000000000000000000000000076
|
||||
:102268000000000000000000000000000000000066
|
||||
:102278000000000000000000000000000000000056
|
||||
:102288000000000000000000000000000000000046
|
||||
:102298000000000000000000000000000000000036
|
||||
:1022A8000000000000000000000000000000000026
|
||||
:1022B8000000000000000000000000000000000016
|
||||
:1022C8000000000000000000000000000000000006
|
||||
:1022D80000000000000000000000000000000000F6
|
||||
:1022E80000000000000000000000000000000000E6
|
||||
:1022F80000000000000000000000000000000000D6
|
||||
:1023080000000000000000000000000000000000C5
|
||||
:1023180000000000000000000000000000000000B5
|
||||
:1023280000000000000000000000000000000000A5
|
||||
:102338000000000000000000000000000000000095
|
||||
:102348000000000000000000000000000000000085
|
||||
:102358000000000000000000000000000000000075
|
||||
:102368000000000000000000000000000000000065
|
||||
:102378000000000000000000000000000000000055
|
||||
:102388000000000000000000000000000000000045
|
||||
:102398000000000000000000000000000000000035
|
||||
:1023A8000000000000000000000000000000000025
|
||||
:1023B8000000000000000000000000000000000015
|
||||
:1023C8000000000000000000000000000000000005
|
||||
:1023D80000000000000000000000000000000000F5
|
||||
:1023E80000000000000000000000000000000000E5
|
||||
:1023F80000000000000000000000000000000000D5
|
||||
:1024080000000000000000000000000000000000C4
|
||||
:1024180000000000000000000000000000000000B4
|
||||
:1024280000000000000000000000000000000000A4
|
||||
:102438000000000000000000000000000000000094
|
||||
:102448000000000000000000000000000000000084
|
||||
:102458000000000000000000000000000000000074
|
||||
:102468000000000000000000000000000000000064
|
||||
:1024780070240080702400807824008078240080F4
|
||||
:1024880080240080802400808824008088240080A4
|
||||
:102498009024008090240080982400809824008054
|
||||
:1024A800A0240080A0240080A8240080A824008004
|
||||
:1024B800B0240080B0240080B8240080B8240080B4
|
||||
:1024C800C0240080C0240080C8240080C824008064
|
||||
:1024D800D0240080D0240080D8240080D824008014
|
||||
:1024E800E0240080E0240080E8240080E8240080C4
|
||||
:1024F800F0240080F0240080F8240080F824008074
|
||||
:10250800002500800025008008250080082500801F
|
||||
:1025180010250080102500801825008018250080CF
|
||||
:10252800202500802025008028250080282500807F
|
||||
:10253800302500803025008038250080382500802F
|
||||
:1025480040250080402500804825008048250080DF
|
||||
:10255800502500805025008058250080582500808F
|
||||
:10256800602500806025008068250080682500803F
|
||||
:1025780070250080702500807825008078250080EF
|
||||
:10258800802500808025008088250080882500809F
|
||||
:10259800902500809025008098250080982500804F
|
||||
:1025A800A0250080A0250080A8250080A8250080FF
|
||||
:1025B800B0250080B0250080B8250080B8250080AF
|
||||
:1025C800C0250080C0250080C8250080C82500805F
|
||||
:1025D800D0250080D0250080D8250080D82500800F
|
||||
:1025E800E0250080E0250080E8250080E8250080BF
|
||||
:1025F800F0250080F0250080F8250080F82500806F
|
||||
:10260800002600800026008008260080082600801A
|
||||
:1026180010260080102600801826008018260080CA
|
||||
:10262800202600802026008028260080282600807A
|
||||
:10263800302600803026008038260080382600802A
|
||||
:1026480040260080402600804826008048260080DA
|
||||
:10265800502600805026008058260080582600808A
|
||||
:10266800602600806026008068260080682600803A
|
||||
:1026780070260080702600807826008078260080EA
|
||||
:10268800802600808026008088260080882600809A
|
||||
:10269800902600809026008098260080982600804A
|
||||
:1026A800A0260080A0260080A8260080A8260080FA
|
||||
:1026B800B0260080B0260080B8260080B8260080AA
|
||||
:1026C800C0260080C0260080C8260080C82600805A
|
||||
:1026D800D0260080D0260080D8260080D82600800A
|
||||
:1026E800E0260080E0260080E8260080E8260080BA
|
||||
:1026F800F0260080F0260080F8260080F82600806A
|
||||
:102708000027008000270080082700800827008015
|
||||
:1027180010270080102700801827008018270080C5
|
||||
:102728002027008020270080282700802827008075
|
||||
:102738003027008030270080382700803827008025
|
||||
:1027480040270080402700804827008048270080D5
|
||||
:102758005027008050270080582700805827008085
|
||||
:102768006027008060270080682700806827008035
|
||||
:1027780070270080702700807827008078270080E5
|
||||
:102788008027008080270080882700808827008095
|
||||
:102798009027008090270080982700809827008045
|
||||
:1027A800A0270080A0270080A8270080A8270080F5
|
||||
:1027B800B0270080B0270080B8270080B8270080A5
|
||||
:1027C800C0270080C0270080C8270080C827008055
|
||||
:1027D800D0270080D0270080D8270080D827008005
|
||||
:1027E800E0270080E0270080E8270080E8270080B5
|
||||
:1027F800F0270080F0270080F8270080F827008065
|
||||
:102808000028008000280080082800800828008010
|
||||
:1028180010280080102800801828008018280080C0
|
||||
:102828002028008020280080282800802828008070
|
||||
:102838003028008030280080382800803828008020
|
||||
:1028480040280080402800804828008048280080D0
|
||||
:102858005028008050280080582800805828008080
|
||||
:102868006028008060280080682800806828008030
|
||||
:1028780048200080000000700000001000000020C8
|
||||
:0C28880048200080FFFFFFFF000002005E
|
||||
:040000058000000077
|
||||
:00000001FF
|
Loading…
Add table
Add a link
Reference in a new issue